Am 31.01.2011 21:43, schrieb Allin Cottrell:
> On Mon, 31 Jan 2011, Leon Unger wrote:
>
>> 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?
> The conversion "%s" in an obs-format string requires that the
> corresponding variable from the database is of string type. For
> example:
>
> string Q = "SELECT country,year,y FROM FooBase"
> data y obs-format="%s:%d" query=Q --odbc
>
> This should work if the "country" variable contains string
> country-codes such as "FRA", "GER", etc., and the year variable
> contains years as integers:
>
> GER:1990 123.5
> GER:1991 127.6
>
> This assumes that the pre-existing gretl dataset has observation
> strings on the pattern shown above.
>
> Allin Cottrell
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
Thank you Allin, now it's working!

I created an empty panel dataset with appropriate obs:time combinations 
and then used the GUI to read in the oberservation markers from a txt file.
I know how to create the 'normal' empty panel via script, but how can I 
get the markers directly from script?

Best
Pindar
Am 31.01.2011 21:43, schrieb Allin Cottrell:
On Mon, 31 Jan 2011, Leon Unger wrote:

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?
The conversion "%s" in an obs-format string requires that the
corresponding variable from the database is of string type. For
example:

string Q = "SELECT country,year,y FROM FooBase"
data y obs-format="%s:%d" query=Q --odbc

This should work if the "country" variable contains string
country-codes such as "FRA", "GER", etc., and the year variable
contains years as integers:

GER:1990 123.5
GER:1991 127.6

This assumes that the pre-existing gretl dataset has observation
strings on the pattern shown above.

Allin Cottrell

_______________________________________________
Gretl-users mailing list
gretl-us...@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
Thank you Allin, now it's working!

I created an empty panel dataset with appropriate obs:time combinations and then used the GUI to read in the oberservation markers from a txt file.
I know how to create the 'normal' empty panel via script, but how can I get the markers directly from script?

Best
Pindar

Reply via email to