I have some values into a table like below :-
- Bank Of America
- testBank Of America
- State Bank Of India
- ICICI Bank
- Test @Bank*
I want a query to get all the values which contains Bank only. Proper word should match.
Result should be like :-
- Bank Of America
- State Bank Of India
- ICICI Bank
Advertisement
Answer
One method is to add spaces to the beginning and end of the column and then look for ' Bank '
:
where ' ' + col + ' ' like '% Bank %'