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 |
|
mike123
Master Smack Fu Yak Hacker
1462 Posts |
Posted - 2002-02-26 : 20:40:43
|
| Is there a simple way to insert 5 values into 5 different rows in a SP?Or do i Have to have 5 insert statements?Is there anything wrong speedwise with doing 5 inserts? thanks |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-02-26 : 20:51:54
|
| insert tblselect 1unionselect 2unionselect 3...==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy. |
 |
|
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2002-02-26 : 20:57:35
|
Well... you can do this:insert into table (value)select 1 as valueunionselect 2union select 3unionselect 4unionselect 5but I suspect that's not what you want..... I 'm guessing (from your question) that you're doing your inserts from ADO - and you'd like some nice easy way to insert multiple records at a time?--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
|
rrb
SQLTeam Poet Laureate
1479 Posts |
Posted - 2002-02-26 : 20:58:35
|
| Gee you gotta be quick around here - sorry nr you beat me to it...--I hope that when I die someone will say of me "That guy sure owed me a lot of money" |
 |
|
|
|
|
|