On 3/29/06, Pam Greene <[EMAIL PROTECTED]> wrote: > On 3/29/06, jt <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I'm implementing a log procedure with triggers on my tables (following > > some ideas found in http://www.sqlite.org/cvstrac/wiki?p=UndoRedo). > > As I have more than one table, I'm generating the relevant SQL to do the > > job. > > I use the quote() function to quote each value of each row. > > > > The problem is that " SELECT quote('foo')!='foo' ": when I tried to > > load the log table in another database, I get "SQL error; constraint > > failed" on every row that has a CHECK constraint. > > The quick solution is to add quote() around each value in the CHECK > > statement. > > > > Is there another way to do it? > > Why is " SELECT quote('foo')!='foo' "? > > > quote('foo') returns 'foo', including the ' '. The 'foo' on your right-hand > side doesn't include the quotes. > > - Pam > >
thanks. I was using it in the wrong way. I should have rtfm. -- jt