Ok, i think i've found my/sqlite problem sqlite_column_decltype and sqlite_column_type are both returning null, so zeos (and presumably sql express) don't know which type to request from http://www.sqlite.org/c3ref/column_decltype.html <http://www.sqlite.org/c3ref/column_decltype.html>"If this statement is a SELECT statement and the Nth column of the returned result set of that SELECT is a table column (not an expression or subquery) then the declared type of the table column is returned. If the Nth column of the result set is an expression or subquery, then a NULL pointer is returned. "
both count(1) and cast(count(1) as integer) return null type using above functions On 6 January 2011 03:43, Richard Hipp <d...@sqlite.org> wrote: > On Wed, Jan 5, 2011 at 10:27 PM, Vannus <van...@gmail.com> wrote: > > > I know sqlite stores data as text, > > > No it doesn't, unless the value really is text. > > > > but why does > > count(1) and cast(count(1) as integer) give a text result? > > > > It will give you the result in any format you ask it to. The conversion is > automatic. If you ask for text (using sqlite3_column_text() or > sqlite3_column_text16()) then you'll get text. If you ask for an integer > (using sqlite3_column_int() or sqlite3_column_int64()) then you'll get an > integer. > > What routine are using to extract the value? > > > > more to the point, why does cast(((myfloatfield*myotherfloatfield)/100) > as > > real) give a text result! > > > > this is really irritating as i've put a lot of time into a project for > > someone only to be unable to complete it. > > > > im on latest 3.7.4 precompiled dll from sqlite website. im not seeing > much > > else on the net for this at all, but it happens with different software > > using different sqlite 3 dll sub- versions. > > > > Thanks for any help, Jim. > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users