On Mon, 26 Oct 2009, Jay A. Kreibich wrote:

>  The documentation on this is fairly clear:
>
>      http://sqlite.org/c3ref/column_database_name.html
>
>      If the Nth column returned by the statement is an expression or
>      subquery and is not a column value, then all of these functions
>      return NULL. These routine might also return NULL if a memory
>      allocation error occurs. Otherwise, they return the name of the
>      attached database, table and column that query result column was
>      extracted from.

Hmm, fair enough.

>
>  Basically, in order for these functions to work, the returned column
>  needs to be a raw, unaltered, column directly from a specific table.
>  Any kind of expression (including aggregate functions) means the
>  data values in that result did not come directly from a specific
>  table column, and therefore these functions return NULL.
>
>  If you need a more general way to get the name of any column in any
>  query, you most likely want sqlite3_column_name().
>
>   -j

I actually need a general way to get the TABLE name from a query ... hmmm 
... back to the documentation ...

Thanks for your very kind reply.

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

Reply via email to