Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Junior Sqler
Starting Member
18 Posts |
Posted - 2013-05-09 : 06:00:29
|
Hi!My question is the following i have created a table in database:Create table status( A int, B VARCHAR(20), C VARCHAR(20), D varchar(20) )and i want to fill it in with data from a temp table (#temp):insert into status (A,B,C,D) select( a.A,a.B,a.C,'oK')from #temp abut the following message appears:Incorrect syntax near ',' (in line with select)What is wrong? Could anyone help me? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-05-09 : 07:02:17
|
it should beinsert status (A,B,C,D) select A,B,C,'OK'from #temp ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
Junior Sqler
Starting Member
18 Posts |
Posted - 2013-05-09 : 07:27:34
|
thank you!! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-05-09 : 07:33:52
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|
|
|