View Single Post
  #2 (permalink)  
Old 02-08-10, 21:19
TerryP TerryP is offline
Registered User
 
Join Date: Feb 2007
Posts: 38
It seems fairly easy task to resolve.
1. Import the data into temp table ie Personnel_Temp allow duplicate null etc.
2. After import, check on duplicates and nulls then remove them in Personnel_Temp.
3. Now join the tables Personnel and Personnel_Temp as below to find only the new records.
SELECT a.*
FROM Personnel_Temp a
Left Join Personnel b
ON a.FullName = b.FullName
WHERE b.FullName IS NULL
4. Insert the records in #3 into Personnel.
INSERT INTO Personnel
SELECT a.*
FROM Personnel_Temp a
Left Join Personnel b
ON a.FullName = b.FullName
WHERE b.FullName IS NULL

All these tasks can be done in "Execute SQL Task" in DTS.

Last edited by TerryP; 02-08-10 at 21:44.
Reply With Quote