I would like to solicit ideas on this as well. An operation similar to insert or replace, but that doesn't allocate a new row ID on replace (just returns the old one through the last insert row ID.) Having to do the search operation, and if it fails do an insert (or vice versa) doesn't seem optimal.
Ian On 1/22/07, Weston Weems <[EMAIL PROTECTED]> wrote:
What I'd ultimately like to do, and what I used to do with a sproc, is the following Pass a string to a sproc, it'll select from table where field = string value, and if no records insert it and grab last inserted id. That way with one call, I can ensure one string in db, and always get the an id back. Is there a way i can do this with sqlite 3 latest? Looks like there is SOME sort of concept of this with views (xp_proc) with parameters etc, but I cant really find any documentation etc. Anyone have any advice for a sqlite newb? Thanks in advance.

