On 04/03/2011 09:05 PM, Petite Abeille wrote: > On Apr 3, 2011, at 3:18 PM, Marcelo Serrano Zanetti wrote: > >> It does not work in this way ... could somebody tell me please what is >> the correct sintax or whether this is possible at all. > As mentioned, SQL is not a procedural language, so, no. > > That said, you can achieve the same effect with two SQL statements called in > succession: > > (1) insert or ignore into table( item ) values( new ) [1] > (2) select itemID from table where item = new > > In other words, always try to create the new item, then select it. > > [1] http://www.sqlite.org/lang_insert.html > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users thx
-- Marcelo S Zanetti __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users