I have a query that returns the field I need to insert into a separate table. This is working fine and my current test data inserts 3 records into my new table. However if I run the query again I insert the same 3 records.
I like to have a IF NOT EXISTS selection right before the insert to prevent records already added into the new table (tblRecount). My criteria would be to insert any records that does not match a combination of 3 fields. So if combination of Item, Location and Count_1 fields already exist in the new table (tblRecount) then do not insert a the duplicate record.
Fields in new table
Any help is appreciated
RJL1
I like to have a IF NOT EXISTS selection right before the insert to prevent records already added into the new table (tblRecount). My criteria would be to insert any records that does not match a combination of 3 fields. So if combination of Item, Location and Count_1 fields already exist in the new table (tblRecount) then do not insert a the duplicate record.
Fields in new table
Code:
CONSOLE_ID
ITEM
LOCATION
ILS
COUNT_1
DIFF
USER_NAME
DATE_TIME
RECOUNT
Any help is appreciated
RJL1