Im trying to filter the word starts with SAG,WAG,DGA from the table:version of column versiondescriptiontablename:versionversionid versiondescription********** *******************1 sag buildagreement2 wag buildagreement3 dga buildagreement
My existing query:Declare @GuildFilter varchar(1000) declare @Guild varchar(1000)set @Guild='DGA,WGA'set @GuildFilter= '['+ replace(@Guild,',','-') +']%' SELECT * FROM version avwhere av.versiondescription like '[DGA-WGA]%'
when i try to pass only DGA and WGA,query also picks SGA .can anyone help me out on this?