Say I have the following:
declare @A table (a int)
insert into @A
select 1 union all
select 2 union all
select 3
select a FROM @A
where a > ALL (select 1 union all select 2)
That will work. But I need to use Like instead of more than here,
declare @A table (a int)
insert into @A
select 1 union all
select 2 union all
select 3
select a FROM @A
where a LIKE ALL (select 1 union all select 2)
Please help me.
Edit : This is what my original old table looks like,
declare @A table (a varchar(500))
insert into @A
select 'a;b;c' union all
select 'a;d;b' union all
select 'c;a;e'
My application sends the values in my SP as' a; b 'or' b; c; a ', etc.,
Now I need to select only those rows in the @A table that have a and b or b and c and a. I use the split function in my SP to make user input as a table. That is why I need to use like EVERYTHING here. But any other suggestion is also welcome.
source
share