
August 30th, 2004, 07:34 AM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 6
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
An update query which will only insert unique records
I am having trouble creating this, my current problem is that i have a query where a list of invoices is created, i wish to store these invoices in a table called invoice, where it will be given an auto number field. However, if the query is run twice, i dont want the repeated invoices entered again. I was thinking i could use my client_id field and payment_count field as a unique identifier, and have a where clause somtheing along the lines of
WHERE payment.client_ID <> invoice.client_ID AND payment.payment_count <> invoice.payment_count
however i am not sure how to implement this, could anyone help me please?
|