I want to perform an insert operation based on the select statement from another table in SQL Server.
I have built this:
INSERT INTO Table1
SELECT table2.var1, table2.var2, 1, GETDATE(), 1, GETDATE(),0
FROM table2
The values in Table1 are all NOT NULL, and there is a couple of record of table2.var2 where there is a null value, I want to skip the Null and continue with the operation.