INSERT INTO [GamingCommissiondb].[dbo].[Corovan_Table](
[TM #], [FirstName], [LastName]
,[SS #], [TerminationDate], [Voluntary or Involuntary]
)SELECT
t.[TM #],t.[FirstName],t.[LastName]
,t.[SocialSecurityNumber], t.[TerminationDate], t.[VoluntaryorInvoluntary]
FROM TERMINATION t
left join [GamingCommissiondb].[dbo].[Corovan_Table] c on t.[TM #] = c.[TM #]
WHERE t.TerminationDate BETWEEN @pdBegin AND @pdEnd
and c.[TM #] is null
âI sense many useless updates in you... Useless updates lead to fragmentation... Fragmentation leads to downtime...Downtime leads to suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
http://sqlservercode.blogspot.com/