Append Query for Unique fields...

Chrisopia

Registered User.
Local time
Today, 08:00
Joined
Jul 18, 2008
Messages
279
I need to append a query, but only for unique fields...

I seem to have a problem where it appends data over, even if it is already there?

I need it to check for a unique "OrderID" before moving it over...

Any help is appreciated.
 
Are you saying you only want to append the records if the orderID is not already in the table already?

If so then use a sub query. In the criteria for the orderID add in

Code:
NOT IN (SELECT OrderID FROM YourTableNameThatYouAreAppendingTo)

If you are saying that the query is returning multiple records for each orderID then the method depends on the data... you could use a SELECT DISTINCT or an aggregate query - but we would need more idea of the data before more help on that.
 

Users who are viewing this thread

Back
Top Bottom