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

Home -> Community -> Usenet -> c.d.o.tools -> Re: group by

Re: group by

From: Rozi & George Goldberger <ghita_at_worldnet.att.net>
Date: Tue, 01 May 2001 16:38:38 GMT
Message-ID: <iEBH6.16152$ua5.3429250@typhoon1.ba-dsg.net>

Use something like

select decode(col,'a','a','ab','a','abc' 'ab', 'abcd','ab',col) as mycol from table
group by decode(col,'a','a','ab','a','abc' 'ab', 'abcd','ab',col) ;

George

<hanton32_at_hotmail.com> wrote in message news:9cmmd3$7ps$1_at_news.netmar.com...
>
> Oracle 7 on Win95
>
> I am trying to group by a column with values such as :
>
> a
> ab
> abc
> abcd
>
> I would like to treat values 'a' and 'ab' as the same value for grouping
> purposes and also treat 'abc' and 'abcd' as one value for grouping
 purposes.
>
> is this possible without using pl/sql ?
>
> thanks
>
> ----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the
 eb -----
> http://newsone.net/ -- Free reading and anonymous posting to 60,000+
 groups
> NewsOne.Net prohibits users from posting spam. If this or other posts
> made through NewsOne.Net violate posting guidelines, email
abuse_at_newsone.net Received on Tue May 01 2001 - 11:38:38 CDT

Original text of this message

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