I have a stored procedure that I need to pass a comma-delimited variable to.
For example, if a certain condition exists, I would pass a list of country codes like this:
AU,RA,PK
The number of items can vary.
In the stored procedure, I need to use those items in an IN
clause such as follows:
WHERE CountryCode IN (@ExcludeCountries)
Is there any way to do this? I can massage the country codes going in to something like N'AU', N'RA', N'PK'
if need be.
Thanks.