I want multiple records to be inserted in table at one time. How do i do this?
SQL batch inserts into table
Collapse
X
-
Hi,
If it was already a table from which i had to take values, then it could be easier. but the problem is,I post some id's comma seperated to one page there i want these id's to insert into table.since these id's are comma seperated i split it and thyen insert one by one using for loop.
So,I don't want to do it in for loop. is there any way to insert these comma seperated id's at one time
Regards ,
"D"Comment
-
Here's a pseudo-code...
1. Create a stored proc that receives an XML variable.
2. This XML variable can have a predefined or generic column names.
3. Read this XML as a resultset (table-looking result)
4. Insert the result of that resultset into your target table.
5. On your front-end, create a formatted-XML-looking string.
6. Pass that string to the newly created stored proc.
Happy Coding!!!
~~ CKComment
Comment