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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-02-16 : 07:28:59
|
| Wafi writes "Hi There,, I am currently using MS SQL Server 2000 as a Database Serveriam wondaring if i can pass an Array as a parameter to Stored procedure and handle it in T-SQLif so please tell how and if not tell what is the best to do this thingWating for ur replay as soon as possibleBest regardsWafi Mohtaseb" |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2004-02-16 : 07:36:30
|
quote: Originally posted by AskSQLTeam Wafi writes "Hi There,, I am currently using MS SQL Server 2000 as a Database Serveriam wondaring if i can pass an Array as a parameter to Stored procedure and handle it in T-SQLif so please tell how and if not tell what is the best to do this thingWating for ur replay as soon as possibleBest regardsWafi Mohtaseb"
you can pass an array the stored proc as a parameter.there are many threads on this forum regarding to passing arrays as parameters to sp'scheck:http://www.sqlteam.com/item.asp?ItemID=637He is a fool for five minutes who asks , but who does not ask remains a fool for life! |
 |
|
|
stephe40
Posting Yak Master
218 Posts |
Posted - 2004-02-16 : 11:35:19
|
| Convert the array to xml. Pass that into the sp. Use the openxml function to open the xml.insert into tableselect * from openxml(...)- Eric |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-02-17 : 08:14:52
|
| No need for XML at all, CSVs are fine. If you have a lot of data you can put it into a temp table before you call the procedure, and write the procedure to pull the data from the temp table. |
 |
|
|
|
|
|