Page 1 of 1

Exporting database to new workfile

Posted: Fri Nov 18, 2011 11:15 am
by jthodge
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.

Re: Exporting database to new workfile

Posted: Fri Nov 18, 2011 11:21 am
by EViews Gareth
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.