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