Hi, I've got a weird one. I'm using the ADO.NET wrapper and this makes two calls in order to determine a column affinity.
First it calls sqlite3_column_decltype and if this returns null it calls sqlite3_column_type 99.9999% of the time this works great. However I have a piece of SQL that UNIONS two selects from the same table. For this particular piece of SQL a column defined as NUMERIC is return INT as the data type, even though the data contains floating point values. So for this column a call to sqlite3_column_type returns INT instead of NUMERIC??? A very similar piece of SQL with a UNION returns NUMERIC for the column. If I add 0.00 to the column (e.g. SELECT COLA + 0.00) it returns NUMERIC otherwise INT (again the actual values have a decimal point) Does anyone know how sqlite3_column_type determines the data type when sqlite3_column_decltype returns null and why sqlite3_column_type would return INT for a column full of floating point numbers in one case and NUMERIC in another? It's driving me nuts and making me wish I'd used Microsofts free SQL Server Express Edition in the 1st place :-( -- View this message in context: http://www.nabble.com/How-does-sqlite3_column_type-work--tf2045348.html#a5631570 Sent from the SQLite forum at Nabble.com.