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 |
avijit_mca
Posting Yak Master
109 Posts |
Posted - 2009-12-04 : 09:15:34
|
i have datagrid.enter 10 rows in datagrid.iwant write sp to insert these 10 rows at a single transcation.how i will do it..Regards,AvijitRegards,avijit |
|
sql-programmers
Posting Yak Master
190 Posts |
Posted - 2009-12-21 : 11:05:42
|
You can build a query string something like this and insert multiple rows.GOINSERT INTO MyTable (Col1, Col2, Col3)SELECT 'Value1' ,'Value2', 'Value3'UNION ALLSELECT 'Value11' ,'Value12', 'Value13'UNION ALLSELECT 'Value21' ,'Value22', 'Value23'SQL Server Programmers and Consultantshttp://www.sql-programmers.com/ |
 |
|
wayne.zjw
Starting Member
10 Posts |
Posted - 2009-12-23 : 16:02:56
|
really good solutioni'm looking for itquote: Originally posted by sql-programmers You can build a query string something like this and insert multiple rows.GOINSERT INTO MyTable (Col1, Col2, Col3)SELECT 'Value1' ,'Value2', 'Value3'UNION ALLSELECT 'Value11' ,'Value12', 'Value13'UNION ALLSELECT 'Value21' ,'Value22', 'Value23'SQL Server Programmers and Consultantshttp://www.sql-programmers.com/
RAQ Report - the best free java reporting tool ever |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|
|