Am 19.07.2018 um 21:10 schrieb Peter H. Lemieux:
On 07/19/2018 11:23 AM, Riccardo (Jack) Lucchetti wrote:
> On Thu, 19 Jul 2018, Peter H. Lemieux wrote:
>> ? open dsn=polls user=phl --odbc
>> Connected to ODBC data source 'polls'
>> ? data dem rep query="select democrat,republican from generic" --odbc
>> ? print dem
>> The symbol 'dem' is undefined
>> However, if I precede the data command with "smpl 1 228", gretl
>> imports all 228 rows.
Hi, can I come back to the beginning here? So
you're saying that the
'data' line essentially failed (no 'dem' created), but the first error
message is after the 'print' command? If so, I'd say it's a little bug
concerning the missing error message.
> Hm, I don't think this is possible at present. The problem is that
> there is no way of guessing how many rows the table returned by a SQL
> query will have until you execute the query itself.
> Would it be possible for to initialise your dataset with a large number
> of observations (say, like, "nulldata 100000") and then drop the
> empty ones?
I thought about trying that. One somewhat inefficient solution would
be to run the query twice,
But these are two different things. Jack suggests to
create a huge
"dummy" dataset on the gretl side, and shrink it to fit afterwards. The
SQL query would still only be run once. So it looks like a practical