Oracle Like and between used togheter

connollyc4

I thought this would have been an easy google search but couldn't find any solutions. Is there a way to use the Like and Between together in a query?

Example

REASON_CODES

A00 VMC B10
A00 RTD B19
.
.
.
A99 RNT B40

I am trying to write a query like:

Select count(*) from table_1 where REASON_CODES like between '%A10%' and '%A25%' 

Is there a solution to do this? I was reading "convert" may do the trick but I had no luck.

Thanks

scaisEdge

You can use substring

  Select count(*) from table_1 
  where   substr(reason_codes, 1,3) between 'A10' and 'A25'; 

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related