This I can’t get my simple brain around. A comma-delimited array of products ordered is passed to a procedure like so:
set @array = 'productID_47, productID_4'
select productID, price from Products
where @array like '%' + productID + '%'
Two records are returned. Great.
But then if I have:
set @array = 'productID_47'
select productID, price from Products
where @array like '%' + productID + '%'
Again, two records are returned which is NOT what I want.
The product codes are fixed, sadly.
Any help would be appreciated, thanks
I am assuming there are no commas when there is only one item in
@array: