I have a string that looks like
declare @where varchar(30000) = ' and a = ''2'' and b = ''blob'' and c = ''charlie 2324''';
I want to write code that will allow my to filter out any string combination within the @where variable. the ' a = ', ' b = ', and 'c = ' will stay the same but the values could be different.
this is how the proc will look
create proc changeSQL
--This is where I need to take out values I dont need
set @where = replace(@where, ' and a = %_%', 'something else')
declare @sql varchar(max) = 'select * from db where g is not null' + @where