Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> look last two digits

look last two digits

From: cptkirkh <khill_at_scic.com>
Date: 25 Apr 2007 14:47:19 -0700
Message-ID: <1177537639.756785.157170@s33g2000prh.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US