Jeff Godfrey wrote:
So, how can I get the correct column types returned for all columns, while at the same time properly handle column names containing spaces?

Thanks for any insight.

Jeff

Answering my own post, I just found that the following works as expected...

set dataType [$db onecolumn "select typeof(\"$colName\") from $table"]

I'm OK with that, but if anyone has a suggestion for a more preferred syntax,
I'm listening.

Also, should space-separated column names "just work" as an argument to
"typeof".  That is, is this a bug?

Thanks,


Jeff

No bug here, the typeof function takes an expression as its argument. If you want to pass a column name that contains special characters as the expression you need to use the SQL standard double quotes to surround that column name identifier. SQLite also accepts a MS Access compatible extension that allows identifiers to be enclosed in square brackets.

   'string literal'
   "quoted identifier"
   [extension quoted identifier]

HTH
Dennis Cote

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to