Solved

can i pass a table to stored procedure

Posted on 2006-11-07
7
1,105 Views
Last Modified: 2012-05-05
I do want to do a bulk insert into database, like 2000 records at a time. Can I pass a datatable to stored procedure and then insert them into destination table all at a time.
0
Comment
Question by:cognos79
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
7 Comments
 
LVL 12

Expert Comment

by:Einstine98
ID: 17893330
I normally do it with XML documents...

1. Pass your data as an xmal document(table)...
2. Parse it to a temp table.
3. insert/update or whatever...

Will post you a link soon...
0
 
LVL 13

Expert Comment

by:devsolns
ID: 17893335
Are you doing this load from another application or through TSQL?  This is mainly a design question.  If this is being done over and over again you may want to do some type of bulk load (see http://www.sqlteam.com/item.asp?ItemID=3207).  Other wise ADO (in .NET) will handle this insert pretty easily without a major datbase performance impact.

Hope this helps.

--DS
0
 
LVL 12

Accepted Solution

by:
Einstine98 earned 500 total points
ID: 17893350
0
 
LVL 3

Author Comment

by:cognos79
ID: 17893472
Einstine98 can you post the link please....
0
 
LVL 12

Expert Comment

by:Einstine98
ID: 17895051
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how the fundamental information of how to create a table.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question