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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 pass a table to stored procedure

Author  Topic 

cognos79
Posting Yak Master

241 Posts

Posted - 2006-11-07 : 16:16:01
Can I pass a table to Stored Procedure. I want to upload 2000 records to database at one shot. So I am trying to find if I can pass 2000 records to stored proc at one time and do a bulk insert

Is this Possible????

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-11-07 : 16:53:05
To answer your question, no you can't pass a table to a stored procedure. Usually you would use BCP or DTS to "upload" data to your database.

Be One with the Optimizer
TG
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-07 : 16:54:50
It is if you use xml to pass the data
then you can use
sp_xml_* stored procedures to import the data

how do you get your data before it enters the stored procedure?

you can use bulk insert if you're importing from a file.




Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -