Running this code returns the error Msg 102, Level 15, State 1, Line 23
Incorrect syntax near 'NewNumbersTest'.
What am I doing wrong?
I'm pretty new to SQL, as you can guess, and know it is simple, but I've followed online examples and it still doesn't work. I'm basically wanting to pull back numbers from the original [Lottery Numbers analysis] table that do not exist in the new [NewNumbersTest] table.
Select [Lottery Numbers analysis].DrawNumber
From [Lottery Numbers analysis] a
join [Lottery Numbers analysis] on [NewNumbersTest].[DrawNumber] = a.DrawNumber
where a.DrawNumber not in [NewNumbersTest].[DrawNumber]