I'm really sorry D. Hipps. My question was silly - I didn't realize that the
function arguments are also parsed by the SQL engine and therefore they
should be valid SQL strings.

I apologize for the annoyance.

Iulian. 

-----Original Message-----
From: D. Richard Hipp [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 1:47 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] quote() function

On Mon, 2005-03-28 at 13:27 -0500, Iulian Popescu wrote:
> Is it something wrong with doing a:
> 
> SELECT quote('AA'AA')
> 

Yes, it is a syntax error.  The ' character within a string in SQL is
doubled to quote it - like in Pascal.  That's the rules of SQL - I did not
make this stuff up.  

The following works:

   SELECT quote('AA''AA');

Compare the output against this:

   SELECT 'AA''AA';

--
D. Richard Hipp <[EMAIL PROTECTED]>

Reply via email to