Hi

I would like to do the following

I have an item to insert in the table which will be inserted only if 
this item is not yet in that table otherwise I would like to return the 
item's key.

like that

IF 1==SELECT COUNT(*) from table WHERE item==new THEN SELECT itemID from 
tabel WHERE item==new ELSE INSERT INTO table (item) VALUES (new)

It does not work in this way ... could somebody tell me please what is 
the correct sintax or whether this is possible at all.

Thank You
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to