October 28, 2005 at 10:39 am
I want to pass a list of part numbers to a stored procedure in the following format
Select [stuff] from [tables] where part_no in (@partNumbers).
Can this be done? As a test I used:
set @partNumbers = '''2000'',''653b'',''657'',''671'',''681'',''692'',''9617'''
so that the @partNumbers is equal to '2000','653b','657','671','681','692','9617'
but this does not work?
I have user input in a db table in the form of 2000, 653b, 657, 671, 681,etc.
My application and do any formating on the part number list supplied by the user but since I dont know the number of parts I'm kinda stuck.
Any help would be great.
thanks
Christian
October 28, 2005 at 10:56 am
Look at this article:
October 28, 2005 at 11:06 am
And this one.
October 28, 2005 at 11:48 am
Many thanks to both of you
October 28, 2005 at 11:49 am
HTH.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply