cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple likes for same field separated by or not working in sqlany16

Former Member
0 Kudos
1,322

I have some sql like

Select * 
from bti.table
where
field between start and stop
and field1 is null
and (field2 like 'HH%' or field2 like 'HS%' or field2 like 'SS%')

I only get results like HH%. What gives? Is there an alternate way to do this? I could make 3 separate queries and combine the results but that would be slow and clunky.

version is 16.0.0.2213

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

I'm an idiot. The issue was there was nothing that met the criteria for the other likes. Sorry

Breck_Carter
Participant

Don't worry about it... you did the right thing by posting a question, sometimes that's the path to epiphany 🙂

Answers (0)