Exporting database to new workfile

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

jthodge
Posts: 77
Joined: Tue Oct 21, 2008 5:52 am

Exporting database to new workfile

Postby jthodge » Fri Nov 18, 2011 11:15 am

Is there a command for exporting data from a database to a NEW workfile?

I know the fetch command works for getting data from a database to an EXISTING workfile.

The reason I'd like to do this is because I don't know the start and end dates of series in a database. When I manually export series from a database to a new workfile, Eviews will automatically detect the appropriate range to use.

I could set up a workfile with a range that is arbitrarily large (e.g. years 1800-2100) and then fetch the data. But this procedure seems a bit inefficient since I'd have a vast number of NAs.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Exporting database to new workfile

Postby EViews Gareth » Fri Nov 18, 2011 11:21 am

Unfortunately not (and it is a glaring omission).

You have to do something like:

Code: Select all

%db = "c:\temp\mydb.edb" %freq = @wquery(%db, "name=X", "freq") %start = @wquery(%db, "name=X", "start") %end = @wquery(%db, "name=X", "end") wfcreate {%freq} {%start} {%end} fetch X
where X is the name of the series.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests