I have a page that populates a text box with a number if integer values - each representing an ID of a vlue in a database, so after selecting options, the box may read:
""
"6"
"5,7"
"6,9,12"
etc
eg. The number of integers listed has no specific length. It could be none, it could be 1, it could be 20 (though a real world likely maximum would be about 5).
OK so far...
I am sending this entire string over to my stored procedure as an input param as a varchar. Because there is no known maximum number of values represented, I cannot realistically map each to an input of its own.
So within my stored proc, this string is known as inputIDs.
I want to select items from a table where these values are ALL matched.
The query is selecting products against a range of paramters for a product - so:
ProductID 123MR1 may match against a product parameters table of paramID = 4, paramID=5 and paramID=10. If my input params were to be '4,5,10' I would want it to match...
Question
+Dick Montage Subscriber²
I have a page that populates a text box with a number if integer values - each representing an ID of a vlue in a database, so after selecting options, the box may read:
""
"6"
"5,7"
"6,9,12"
etc
eg. The number of integers listed has no specific length. It could be none, it could be 1, it could be 20 (though a real world likely maximum would be about 5).
OK so far...
I am sending this entire string over to my stored procedure as an input param as a varchar. Because there is no known maximum number of values represented, I cannot realistically map each to an input of its own.
So within my stored proc, this string is known as inputIDs.
I want to select items from a table where these values are ALL matched.
The query is selecting products against a range of paramters for a product - so:
ProductID 123MR1 may match against a product parameters table of paramID = 4, paramID=5 and paramID=10. If my input params were to be '4,5,10' I would want it to match...
Any ideas?
Link to comment
Share on other sites
13 answers to this question
Recommended Posts