Friday, December 26, 2014

using case function with insert

When you use


INSERT into dbo.SelectQueries (Name,LastName,Email,Salary,Monthduration,Country,Categories)


VALUES(v1, v2, ...)


You need to put the values in the (), not the column name


OR


You can use


INSERT into dbo.SelectQueries (Name,LastName,Email,Salary,Monthduration,Country,Categories)


SELECT c1, c2, ...


FROM dbo.YourTable




A Fan of SSIS, SSRS and SSAS



No comments:

Post a Comment