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: Help another zipcode delimma

Re: Help another zipcode delimma

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 15 Mar 2007 13:50:38 -0700
Message-ID: <1173991836.967009@bubbleator.drizzle.com>


anitra_tanner_at_yahoo.com wrote:
> Thanks for the help on the previous question but now I have been
> presented with the following issue.
>
> In the same field we have 3 different scenarios
>
> 5 digit zip
> 12345
>
> 6 digit zip
> 12345-
>
> 10 digit zip
> 12345-1311
>
> I want to say give me all the zips that are 5 and 6 digits and where
> there is a 6 digit, dont show the
> dash (-). so when my query runs they will all look like 5 digit
> zips. I have made a seprate query for the 10 digit.
>
> previously I used length(zip) = 5

Think about using DECODE or CASE or Regular Expressions. There are probably a dozen ways, some with LENGTH, to solve the problem.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu Mar 15 2007 - 15:50:38 CDT

Original text of this message

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