Home Forums SQL Server 2008 SQL Server 2008 - General Copying Table1 to Table2 RE: Copying Table1 to Table2
spaghettidba
SSC Guru
Points: 105732
More actions
June 24, 2010 at 3:01 am
#1184383
This should do the trick:
INSERT INTO Table2
SELECT DISTINCT Places
FROM Table1 AS A
WHERE NOT EXISTS (
SELECT 1
FROM Table2 AS B
WHERE A.Places = B.Places
)
-- Gianluca Sartori