Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Select only if two character and two number
rsarwar_at_ifsna.com (Rauf Sarwar) wrote in message news:<c2d690f2.0207021823.480c49e7_at_posting.google.com>...
<snip>
> >
> > I think
> >
> > SELECT * FROM tmp
> > WHERE WHERE TRANSLATE(cd,
> > 'BCDEFGHIJKLMNOPQRSTUVWXYZ123456789',
> > 'AAAAAAAAAAAAAAAAAAAAAAAAA000000000') LIKE 'AA00%'
> >
> > will get you what you want without all that PL/SQL!
> >
> > CE
>
>
> > will get you what you want without all that PL/SQL!
>
> Correct. There is always more then one way to solve a problem. I would
> favor a function in this instance atleast for scalabilty and code
> management. Even though both queries probably cost the same (Full
> table scan), function will take care of both UPPER/lower cases...Plus
> deploy it once, use it from anywhere.
>
> Just thought I will put my two cents in -:)
>
> //Rauf Sarwar
I don't disagree with what you say, but the function could just as well have my little bit of SQL in (with an UPPER to cater for mixed case). A function-based index would get get rid of the full-table scan issue.
And that's 2 of my shiny English pennies!
CE Received on Wed Jul 03 2002 - 03:41:56 CDT
![]() |
![]() |