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 -> Re: select criteria by length

Re: select criteria by length

From: Chris L. <diversos_at_uol.com.ar>
Date: Thu, 26 Jul 2007 10:37:33 -0700
Message-ID: <1185471453.204720.208080@22g2000hsm.googlegroups.com>


On Jul 26, 1:53 pm, PaulR <honeybeekee..._at_gmail.com> wrote:
> I know the table and column(varchar 20) I want, however I want to
> return only that data that is 7 chars or less, how would I restrict my
> query for that? Thanks

SELECT * FROM tablename
WHERE LENGTH(columname) <= 7;

Likely a function-based index would help performance? Received on Thu Jul 26 2007 - 12:37:33 CDT

Original text of this message

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