> -----Original Message----- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Simon Slavin > > would something like > > SELECT CAST (theValue AS REAL) AS thisValueReal FROM ... > > force the driver to recognise that the value it was getting was REAL ? > > Simon.
I did not have high hopes, but it did work! That led me to wonder why that could be. I found out that it has to do with the declared type name of the column. "DECIMAL" is no good. However, if you declare a column as "REAL" it works without any CAST function. If you column is an expression, however, you still have to use the CAST function. But at least it can be brought to work. Worth mentioning is that the cell format is still "General" but it now really works as a decimal (i.e. you can sum on it). The above is surprising as Christian Werner writes the following in the documentation: " Since October 14th, 2001, the driver supports the data types SQL_INTEGER, SQL_TINYINT, SQL_SMALLINT, SQL_FLOAT, SQL_DOUBLE, SQL_DATE, SQL_TIME, SQL_TIMESTAMP, and SQL_VARCHAR." However, for it to work in Excel, you have to define columns as one of the following: INTEGER REAL DATE VARCHAR I'll let him know. ------ Still, if anyone knows how to use the ADO.NET driver that could also be interesting, since the ODBC driver is a bit bothersome in that you apparently have to define a Data Source Name for each individual database that you want to access -- I haven't found any way to work around that. If one chooses just the "SQLite3 Datasource" as data source there is an error message to the effect that the data source contains no visible tables. For other data sources a particular database can be specified as part of the selection process. /Frank Missel _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users