Hello,
I have an import which I import into a staging table called stg.HandlerDirectory. Columns are ClaimHandler and TeamTrayName. I also have the same columns in a table called dbo.HandlerDirectory with an extra column called ID which is assigned the Identity parameter.
I am trying to get SQL to look through the stg tbale and find matches in the dbo table. If there are matches then I would like the dbo table updated and if there are no matches in the stg table then I would like that data inserted into the dbo table. So far I have come up with the following code but the ELSE statement is being ignored.