sql server - SQL -- IF select A is not in Select B Then Select B else nothing -


i trying result sql:

i have 2 selects:

select columna table1;  select columna, columnb, columnc table2; 

i want return second select if results select 1 not %columna% of select 2.

example: results select 1;

hot dog hamburger fries 

results select 2;

shake | chocolate | 100 cal fries | curly | 200 cal 

hoping result (after if):

shake | chocolate | 100 cal 

select t2.*     table2 t2     left join table1 t1     on t2.columna not '%' + t1.columna + '%'     t1.columna null 

Comments