Here is an example row found in both tableA and TableB:
col1 col2 col3
123 | asdf | ddd
I was going to try to use a CTE To retrieve this value, but i have only got it to work with one column at a time.
Here is what i have so far, but right now I am stumped.
;with cte as (
SELECT A.col1
,A.col2
FROM tableA A
)
select col1, col2 from cte where col1, col2
not in (select col1, col2 from FHU.dbo.HolidayCallers)
And just to reiterate i am expecting output to be the original sample row up top.
Based on your question, you’d could use EXISTS to find rows where the related columns are in both tables.
BUT, based on the sample code you provided, it seems like you are looking for a NOT EXISTS condition: