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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Query with 'LIKE' comparison questions

Re: Query with 'LIKE' comparison questions

From: <casey.kirkpatrick_at_gmail.com>
Date: 12 Oct 2005 13:46:20 -0700
Message-ID: <1129149980.367240.39190@f14g2000cwb.googlegroups.com>


Short term fix:

SELECT * FROM table WHERE acct_num IN (
:val,

lpad(:val,1,'0'),
lpad(:val,2,'0'),
lpad(:val,3,'0'),
lpad(:val,4,'0'),
lpad(:val,5,'0'),
lpad(:val,6,'0'),
lpad(:val,7,'0'),
lpad(:val,8,'0'))

(Replacing :val with whatever value you are querying for, and extening the lpad value as high as it needs to go) Received on Wed Oct 12 2005 - 15:46:20 CDT

Original text of this message

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