sql - Compare between strings in query statement in Oracle -
i have table:
id value aa000001 500 aa000002 1000 aa000003 1500 aa000004 2000 aa000005 2500 aa000006 3000 aa000007 3500
the type of id string , use below sql statement query record:
select sum(value), max(value), min(value) my_table id between 'aa000001' , 'aa000007'
and it's works expected. wonder if there exceptions in query?
i'm using oracle 10g release 2 , 11g release 2.
thanks in advances.
i'm not sure mean "exceptions". query is:
select sum(value), max(value), min(value) my_table id between 'aa000001' , 'aa000007';
it match between these values. in addition in table, match, say, 'aa000003zyw243'. safe matches start 'aa00000'. next character between '1' , '7', , can follow (unless character '7').
Comments
Post a Comment