Am 31.01.2011 15:55, schrieb RENIER Mélanie:

Dear All,

 

I have one problem when trying to import data via odbc.

It connect to the server but does not achieve to load the data.

I have the following message error:

 

? open dsn=inf1 --odbc

Connected to ODBC data source 'inf1'

? data x y query="select code,denomination from usig.co_etciv" --odbc

 

Error executing script: halting

> data x y query="select code,denomination from usig.co_etciv" –odbc

 

Do you maybe know where does the problem come from or where I can have more details?

 

Thanks in advance,

 

Kind Regards,

 

Mélanie Renier

 


Hi Mélanie,

sounds for me like an error resulting from a misspecified SQL statement.
Is it an Access Database? Or perhaps the stucture of your workfile does not fit.
By the way, I personally prefer performing ODBC operations with scripts, because it much easier to alter the code and to reuse it.

In terms of importing data via ODBC I've got another general question myself:
    obs-format combinded with string (%s) does not work, or to be precise, GRETL
    crashes immediately!
Could someone provide an example for such string indices?
    E.g. I want to load for 4 Countries GER, UK, JP, CN the CPI and WPI series in the
    following order:   GER CPI
                                    GER  WPI
                                    UK    CPI
                                       .....
   I succeeded in using numbers instead of Names (1:1; 1:2; 2:1...). But if it's possible to
   use the strings with %s it would be even nicer.

Thanks in advance
Pindar