On Tue, 25 Dec 2007 15:07:12 +0100, "Mag. Wilhelm Braun" <[EMAIL PROTECTED]> wrote:
>hi, > >just a short question to speed up: > >as with any database one has quite often to decide if we *INSERT a NEW >row -- or -- UPDATE an existing row* > > >at the moment I do a check select on an unique ID intege which is >resonable fast: > > code: > ------------------------------------------------------------------------ > > SELECT ID FROM MyTable WHERE Account='MyAccountName' > > ------------------------------------------------------------------------ > >I just fetch one row. > >if that get's a return I update otherwise I insert a new row. > >QUESTION: is there a better way to make this important decision? using >Sqlite > >regards W.Braun INSERT OR REPLACE may work for you. http://www.sqlite.org/lang_insert.html http://www.sqlite.org/lang_replace.html -- ( Kees Nuyt ) c[_] ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------