Hello Experts. I have a temp table, and initially I just want to insert into it, one column value "EntityId". So after the insert statement all EntityId column fields will be populated based upon my insert statement that involves a sub query.
My insert statetement is failing though. I have tried changing the syntax of the insert statement, and my syntax is incorrect. Can someone tell me how to change the INSERT statement below, so that it will insert the #TempTable with the EntityId values?
CREATE TABLE #TempTable (EntityId varchar(64),
INSERT INTO #TempTable SELECT EntityId from Customers where EntityId NOT IN (Select EntityId from OldCustomers)