SQL task for adding data not in table
Posted on 2011-09-20
I have a SQL 2000 DTS that I would like to insert data present in one table not in a second table.
The first table (myTableA) has one field: ItemCategory
The second table (myTableB) has 2 fields: CustomerID and ItemCategory
I want to be able to add values from the first table (myTableA) that are not present in myTableB.
myTableA: AAA, ABC, DEF
myTableB: CustomerID: 123, ItemCategory: AAA
CustomerID: 123, ItemCategory: ABC
So the task would run and find that CustomerID: 123 was missing ItemCategory DEF
Any idea how I can do this?
Thank you in advance!