Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> look last two digits
If I want to look up the last two digits of a number and I don't know
how many digits the number is what SQL query can I use? I tried the
following
select ID from table where substr(id,6) = 30; and it will only work if the number of digits is constant. What if I go from a 7 digit number to a 6 digit number? Thanks for your help. Received on Wed Apr 25 2007 - 16:47:19 CDT
![]() |
![]() |