On Sat, 21 Mar 2020, Allin Cottrell wrote:
On Sat, 21 Mar 2020, Artur Tarassow wrote:
> Sorry, but I've explored some further issues:
>
> 1) "DATUM" is a date string in the format YYYY-MM-DD. This format seems to
> cause trouble as an error occurs for the query:
> QUERY: "SELECT DATUM FROM OV_AS_LAB_LUMEN.IFO_DATA LIMIT 10"
>
> <output>
> SQL query: 'SELECT DATUM FROM OV_AS_LAB_LUMEN.IFO_DATA LIMIT 10'
> SQLConnect(dbc,...): SQL_SUCCESS
> Number of columns = 1
> col 1 (DATUM): data_type invalid, size 10, digits 0, invalid 'nullable'
> value!
Hold it there! What's the actual SQL data type of this column? Obviously it's
not recognized by gretl (though "invalid" is probably too strong a judgment).
You say it's a "date string", and gretl recognizes these string types:
SQL_CHAR, SQL_VARCHAR, SQL_WCHAR and SQL_WVARCHAR.
We don't currently handle the SQL_DATE type. That's something I'm working on
right now, but it doesn't sound as if this is an SQL_DATE column.
I've used the workaround of using the functions SQL YEAR(), MONTH() and
DAY() in my SELECT statements to go around that, and it's worked ok.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------