On Thu, 5 Mar 2015, Mike Walker wrote:
I’m a huge fan of the gretl platform and use it quite a bit in my
professional job. But recently, I’ve run into some trouble. Are you
still able to provide help on gretl? I’m trying to import data using
ODBC connection, but I’m halting at the data command line.
Here is my code:
open dsn=FIGTrading --odbc
string SQLQuery = "SELECT spreads_ont5year, spreads_cmb5year FROM tbl_Spreads WHERE
((spreads_date)>(DateValue(Date())-200))"
data y t obs-format="%g" query=SQLQuery –odbc
Here is what gretl returns:
gretl version 1.9.92
Current session: 2015-03-05 16:34
? open dsn=FIGTrading --odbc
Connected to ODBC data source 'FIGTrading'
? string SQLQuery = "SELECT spreads_ont5year, spreads_cmb5year FROM \
tbl_Spreads WHERE ((spreads_date)>(DateValue(Date())-200))"
Replaced string SQLQuery
? data y t obs-format="%g" query=SQLQuery --odbc
Error executing script: halting
> data y t obs-format="%g" query=SQLQuery --odbc
I haven't made much use of gretl's ODBC facility myself, but it was
working OK the last time I tested. Off the top of my head I can
suggest a couple of things (and hope that someone else has more to
say).
* I'm not sure about that obs-format="%g" clause. Maybe try the
command without it?
* See if you can garner any more info about what went wrong by looking
at the "stderr" output. On Linux or Mac that's just a matter of
launching gretl from the command line. On Windows, launch gretl.exe
with the --debug flag and a console window will show stderr.
Allin