On Tue, 2 Feb 2010, Chris wrote:
I'm having some trouble getting data into gretl through ODBC. I
have a
fairly large sql statement, so I'm importing it from a file. When I run the
data command I get an error and it halts. Here's the command script:
nulldata 160
setobs 5 2001:1 --time-series
open dsn=guestCalgary user=####### password=##### --odbc
string QRY1 = readfile("C:/gretl/maxbufftemp.txt")
data maxbufftemp obs-format-"%d" @QRY1 --odbc
gives me this error:
gretl version 1.8.7
Current session: 2010-02-02 14:34
? nulldata 160
periodicity: 1, maxobs: 160,
observations range: 1-160
? setobs 5 2001:1 --time-series
Full data range: 2001 - 2160 (n = 160)
? open dsn=guestCalgary user=##### password=#### --odbc
Connected to ODBC data source 'guestCalgary'
? string QRY1 = readfile("C:/gretl/maxbufftemp.txt")
Replaced string QRY1
? data maxbufftemp obs-format-"%d" @QRY1 --odbc
Error executing script: halting
> data maxbufftemp obs-format-"%d" @QRY1 --odbc
The syntax here is "obs-format=fmt". That is, an equals sign
rather than a hyphen/dash comes after "obs-format".
One question about your dates setup:
setobs 5 2001:1 --time
This is rather unusual. With frequency 5 one would expect daily
data, and therefore something like
setobs 5 2001/01/02
Allin Cottrell