I have a query where comma seperated barcodes are provided. But for some unknown reason it is not working:
Below is the code that does not work
DECLARE @txtBarcode VARCHAR(MAX)
SET @txtBarcode = '2003824,2003825';
SELECT [Scan_Curr_Location]
FROM BarCode_Location_Current
WHERE Scan_Curr_BarCodeNo IN (@txtBarcode)
ORDER BY [Scan_Curr_BarCodeNo] ASC
However when I change it to a single barcode it works fine i.e:
SET @txtBarcode = '2003824';
Please advice.
Thanks!