-----Original Message-----
From: Luís Santos [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 03, 2007 2:41 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Strange behaviour on Update

Hi, Ppl

We have found a strange behaviour on SQLite 3.4.1 (We have also tested against 
versions 3.0.8, 3.2.5 and 3.4.0)

When we create a field with a name composed exclusively of numeric algarisms, 
we cannot perform an update.

We have only noticed this odd behaviour because of a NOT NULL field. See the 
code example:

    sqlite> CREATE TABLE test (
       ...>       id INT NOT NULL,
       ...>       FieldOne TEXT NOT NULL,
       ...>       FieldTwo TEXT,
       ...>       "1" TEXT
       ...> );
    sqlite> insert into test (id, FieldOne ) values (1, "4");

    sqlite> update test set FieldOne ="1";
    SQL error: test.FieldOne may not be NULL

Has anybody stumbled upon something like this?

Thnx
Luís Santos
=======================================
=======================================

It works ok for me in 3.4.0 if I use single quotes, i.e.,

     update test set FieldOne ='1'; 


I believe single quotes are correct for character constants, and double quotes 
for column names.
Nonetheless, I think sqlite lets you sneak by in many cases using double quotes 
for constants, but your table has a column named "1".


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

Reply via email to