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 |
hspatil31
Posting Yak Master
182 Posts |
Posted - 2013-12-17 : 02:46:25
|
Dear All,I have following hash table in C#.Rank Slug 1 ABC 2 XYZ 3 PQRI want to pass hash table or data table to the store procedure and use the looping inside the store procedure.Can anyone please help how to do above scenario ?Thanks and Regard'sHarish Patil |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2013-12-17 : 02:50:42
|
You can either pass it as XML or as a Table Valued Parameter. For the TVP, you will need to create a TYPE in SQL and use that type as the input, there are a few constraints, but if you can work with them, it is the faster way to pass a table.See http://msdn.microsoft.com/en-us/library/bb675163(v=vs.110).aspx for more detail on how to go about this. |
|
|
hspatil31
Posting Yak Master
182 Posts |
Posted - 2013-12-17 : 05:01:26
|
Thanks RickD. Your post is helpful.Thanks and Regard'sHarish Patil |
|
|
|
|
|