Re: [sqlite] Avoiding duplicate record insertion

2006-06-18 Thread Kurt Welgehausen
[EMAIL PROTECTED] wrote: > I have a related question. Suppose I have a table containing rows each with > values and a counter. If the new row is unique in the table it should be > INSERTed and the counter set to 1; otherwise the counter for the matching > row should be incremented. It's a classi

Re: [sqlite] Avoiding duplicate record insertion

2006-06-18 Thread zzassgl
On Sun, Jun 18, 2006 at 01:16:35AM -0400, C.Peachment wrote: > On Sun, 18 Jun 2006 00:23:58 -0400, David D Speck wrote: > >What would the most elegant way be to insert a name and address entry > >into the main table ONLY if it is not already there? I could see doing > >a SELECT WHERE lname = new

Re: [sqlite] Avoiding duplicate record insertion

2006-06-18 Thread A. Pagaltzis
Hi David, * David D Speck <[EMAIL PROTECTED]> [2006-06-18 06:25]: > What would the most elegant way be to insert a name and address > entry into the main table ONLY if it is not already there? I > could see doing a SELECT WHERE lname = new_lname AND fname = > new_fname, AND street = new_street, et

Re: [sqlite] Avoiding duplicate record insertion

2006-06-17 Thread C.Peachment
On Sun, 18 Jun 2006 00:23:58 -0400, David D Speck wrote: >Please pardon what may be a rank newbie question, but I'm just starting >with SQL and have not seen this addressed in the tutorials that I've >studied. >I have to compile a single name and address list from many small list >files. It

[sqlite] Avoiding duplicate record insertion

2006-06-17 Thread David D Speck
Please pardon what may be a rank newbie question, but I'm just starting with SQL and have not seen this addressed in the tutorials that I've studied. I have to compile a single name and address list from many small list files. It is likely that many of the names will be present in more than