You could import all of the records from excel into a staging table then write a simple insert script where not exists.
Or create an ssis package to import the excel file into the table directly where not exists.
If you are not familar with SQL I would recommend the first method.
Launch studio manager, right click on the database select task import data
use excel as your connection and find your spreadsheet. Import into a staging table. (sheet1 is usally the default) execute.
Then use query analyzer to write an insert script where the records do not exist. you will need to know the primary key of the existing data.
Hmm I am going with Importing wizard but I dont know "where not exits" I have used simple insert statement
INSERT INTO ASICActivity (ID,Code,Name,,SectorID,TypeID,SubNDPCode)
VALUES (ID,Code,Name,,SectorID,TypeID,SubndpCode)...Can you Please edite this for mee
You must first import the data to a staging table, then use that staging table as data source to populate the "real" table.
INSERT INTO ASICActivity (ID, Code, Name, SectorID, ...)
SELECT ID, Code, Name, SectorID, ...
WHERE NOT EXISTS (SELECT 1
FROM ASICActivity as A
WHERE A.ID = ASICActivityStaging.ID
With kind regards . . . . . SQL Server 2000/2005/2012
Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2. Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages