If your table is defined as

CREATE TABLE table0 (col1 INTEGER, col2 TEXT, col3 INTEGER)

I believe the correct syntax would be:

SELECT col1, quote(col2) AS col2, col3 FROM table0;


Instead of * you list the columns, separated by comma. Since you're using
quote() around col2, you probably need to specify "AS col2" since otherwise
it will not know what to name that column (if you're using names to access
them).

-----Original Message-----
From: Richard Boyd [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 03, 2005 6:02 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] quotes around text in returned data?



>>Use the built-in quote() function.
--

Ok I think I found it. (http://www.sqlite.org/lang_expr.html)
I'm not really familiar with this method of calling a function in an
expression. Is there away to have it only quote the TEXT columns and not the
INTEGER columns, or does it do this anyway by default?

Ideally I'd like the entire row returned with TEXT strings in quotes but
everything else left as normal.

SELECT * from Table0 quote(??some expression in here??);
????

Sorry, I'm a bit lost.  Are there any code snippets on the usage?

Thanks again.
R.



Reply via email to