Skip to content

Instantly share code, notes, and snippets.

@cshtdd
Created July 10, 2014 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cshtdd/6eb50c10d56d95cc9db3 to your computer and use it in GitHub Desktop.
Save cshtdd/6eb50c10d56d95cc9db3 to your computer and use it in GitHub Desktop.
declare @param varchar(50)
set @param='PNS,PNR,PUG'
declare @value varchar(50)
set @value='PNR'
select 'yes' as [contains] where charindex(',' + @value + ',', ',' + @param + ',', 0) > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment