0

Please guide me about following case. I need to fetch records from a table which has a column like shown in the picture. I need to fetch records which has 065 and AMT campaigns only.

I tried:

SELECT * FROM table WHERE Campaigns LIKE '%AMT%' OR '%065%'

Unfortunately, it is not working. Data should not be duplicated.

SQL Reference Screenshot

Paul White
  • 94,921
  • 30
  • 437
  • 687

1 Answers1

2

Easiest way to achive this could be:

SELECT * FROM table WHERE Campaigns LIKE '%AMT%' OR Campaigns LIKE '%065%'

You can also look at this answer:

https://dba.stackexchange.com/a/170603/74024

Paweł Tajs
  • 1,361
  • 8
  • 16