Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

can i pass a table to stored procedure

Posted on 2006-11-07
7
Medium Priority
?
1,108 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 2000 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

Industry Leaders: 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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

730 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