On Wed, Oct 10, 2012 at 8:21 PM, jkp487-sql...@yahoo.com
<jkp487-sql...@yahoo.com> wrote:
> New to SQLite. Is there a way to get column data type information for
> derived columns in a query or view? For example, if I have something like
> this:
>
>
> select Customer.LastName || Customer.FirstName as Fullname
>
>
> then no data type is returned for that column. I’m using Delphi to access
> the database and Delphi’s field objects throw a fit if they don’t have a data
> type. Thanks much for your help.

I've had a similar problem with aggregate functions like SUM().
sqlite3_column_declType() returns an empty string for columns of a
statement that are the result of an expression but
sqlite3_column_type() should return the correct SqLite datatype (one
of SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB) once the
statement has been prepared. Which API call does the Delphi unit that
implements SqLite connectivity uses to determine which TField
descendant to use for the column? From my experience it should use the
former first to get the "declared" datatype but should fall back to
the latter if the declared type is an empty string.

HTH
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to