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

  • When you say "Unfortunately, it is not working", please tell us WHY it's not working. Also, please provide more information regarding your comment about "Data should not be duplicated". Do you just need to modify your query to be SELECT DISTINCT * FROM table where...? Providing sample input data and expected output will allow us to provide a more complete answer. Aug 11, 2017 at 9:06

1 Answer 1


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:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.