I am unable to figure out why the NOT LIKE operators are not working properly. I have 34 sample_name
in the database that start with NT but it only get rid of some, and not other. When I try searching with LIKE ('NT%)
, it search them all. Below is what I have.
WHERE
full.full_id IN ('272', '273')
OR full.full_id IN ('567', '686')
AND random.sample_name NOT LIKE ('NT%')
答案 0 :(得分:2)
You have an extraneous ,
in the IN
list and you are missing the '
at the end of your NOT LIKE statement. The statement should look like the following:
WHERE full.full_id IN ('272', '273', '567', '686')
AND random.sample_name NOT LIKE ('NT%')
答案 1 :(得分:1)
You have several errors in the code you have posted. I am going to guess that you intend:
WHERE full.full_id IN (272, 273) AND
random.sample_name NOT LIKE 'NT%'
Notes:
IN
list.LIKE
patternLIKE
pattern (although that is not a syntax issue)