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 |
|
liangtp@hotmail.com
Starting Member
27 Posts |
Posted - 2008-09-10 : 23:39:15
|
| Hi Guys,I have a string "1, 2, 3" and when passed to the SQL server to run as :declare @temp table (ServiceNo Int)insert into @tempselect 1, 2, 3Error occurred. I wish it to be inserted as 3 records. How shall the correct SQL statment look like?Thanks. |
|
|
hey001us
Posting Yak Master
185 Posts |
Posted - 2008-09-11 : 00:04:11
|
| declare @temp table (ServiceNo Int)insert into @tempselect 1 UNIONSELECT 2 UNION SELECT 3hey |
 |
|
|
ranganath
Posting Yak Master
209 Posts |
Posted - 2008-09-11 : 00:57:20
|
| Hi,split the records and insert into the table |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|