Whats the trick with SQLites working set to format a single statement with parameters where if a row exists for a given criteria, returns its Id, otherwise insert and return the last_insert_rowid()?
For example: CREATE TABLE Foo ( Id INTEGER PRIMARY KEY NOT NULL, ColA TEXT NOT NULL, ColB TEXT NOT NULL ); So the statement always returns the Id scalar value for an existing row or the new insert? Not sure case can do accomplish that, if/begin/end is not an option... Thanks, jlc _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users