odb not recognising data type / column format from SQLite
Posted: Fri Feb 05, 2010 11:43 pm
I hope I am in the right place as I have googled extensively and experimented a lot but I am beginning to thing this might be a bug; before yelling bug I thought I'd ask here.
Scene:
SQLite3 database as external source
A number of views exist in the db
the odb file doesn't seem to recognise the data type of the columns in the view even when CAST
Example:
in the SQLite db I have:
CREATE VIEW "J13" AS
SELECT
CAST (avg("U") * 7.0 AS NUMERIC) as "u",
CAST (count(*) AS INT) as "days"
FROM dr
WHERE Date >= "2010-01-13"
but for reasons I cannot work out in the odb the number columns appear as Field Type Text [wvarchar] which they clearly are not. I am not able to change the field type to anything sensible (anything numeric would probably do).
I can work around this using macros, etc. when I drag the data into calc but don't think I should have to.
Before anyone starts on the "SQLite is loose on definition" thing: look at the CASTs, they are clear, it is the odb that is getting it wrong.
Hopefully someone can help or provide further information before I yell bug.
TIA
Scene:
SQLite3 database as external source
A number of views exist in the db
the odb file doesn't seem to recognise the data type of the columns in the view even when CAST
Example:
in the SQLite db I have:
CREATE VIEW "J13" AS
SELECT
CAST (avg("U") * 7.0 AS NUMERIC) as "u",
CAST (count(*) AS INT) as "days"
FROM dr
WHERE Date >= "2010-01-13"
but for reasons I cannot work out in the odb the number columns appear as Field Type Text [wvarchar] which they clearly are not. I am not able to change the field type to anything sensible (anything numeric would probably do).
I can work around this using macros, etc. when I drag the data into calc but don't think I should have to.
Before anyone starts on the "SQLite is loose on definition" thing: look at the CASTs, they are clear, it is the odb that is getting it wrong.
Hopefully someone can help or provide further information before I yell bug.
TIA