April 11, 2008 at 1:39 pm
How do i concatenate the two values as one parameter..
Below is my stored procedure..
CREATE PROCEDURE dbo.usp_GetTD
@CTMP VARCHAR(100)
AS
SELECT * FROM tableP
WHERE Ptno IN (@CTMP)
execute usp_temp '111-11-1111','222-22-2222'
Thanks for help in advance !!
April 13, 2008 at 6:10 pm
I see what you posted and I'm still not sure what you want. Can you be a bit more descriptive, please?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 3:12 am
Assuming there may be more than two of them in there, possibly your best bet is to pass them in as a single string with a unique delimiter:
execute usp_temp '111-11-1111,222-22-2222,333-33-3333' etc
Then use a loop to split up the string into individual values, insert these into a temp table, and do a join to this table.
April 14, 2008 at 3:32 am
Also asked and answered here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=100812
N 56°04'39.16"
E 12°55'05.25"
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply