February 11, 2015 at 5:17 pm
Look at Jeff Moden's DelimitedSplit8K function. It basically converts a delimited string to a table that you could use in a join.
February 11, 2015 at 6:23 pm
pietlinden (2/11/2015)
Look at Jeff Moden's DelimitedSplit8K function. It basically converts a delimited string to a table that you could use in a join.
Or instead use a Table Valued Parameter: The SQL TABLE Type: Beyond Table-Valued Parameters [/url]
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
February 11, 2015 at 9:20 pm
Oh, I thought that's what Jeff's code did. Guess I have more to learn than I thought!
February 12, 2015 at 4:17 am
You can pass comma separated string as a parameter and inside stored procedure call a function which will split comma separated string and return the result set.
February 23, 2015 at 10:58 pm
sharonsql2013 (2/11/2015)
My Store proc has the where filter with an in clausewhere abc in (@xyz)
However while executing , Can I pass multiple values?
Exec usp.Planner @xyz = ????
As your procedure already has where filter with an in clause. Just pass multiple values as comma separated to you parameter.
Exec usp.Planner @xyz = 'a,b,c'
____________________________________________________________
APViewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply