Friday, August 2, 2013

How to pass mulltiple values to a single variable in SQL

First of all How do you pass your location variable? Is it a comma separated or as a Table?


If you are passing as a comma separated value, I would suggest you to look at Table value parameter to pass the location as a Table. Once you have the table as a parameter, then you can join the table with your actual query.


Please read the below link for TVP.


http://msdn.microsoft.com/en-us/library/bb510489.aspx




Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.


No comments:

Post a Comment