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: DECODE

Re: DECODE

From: Graham Bleach <itdcgb_at_its.spamfree.hants.gov.uk>
Date: Fri, 11 Feb 2000 14:27:24 -0000
Message-ID: <88163i$41u$1@news.hants.gov.uk>


There is/was a bug with DECODES nested within GROUP BYs. this caused queries to return incorrect results. It originally emerged in 7x, then reappeared in 8x.
Sorry I haven't get any more details, but we encountered this over a year ago. It may well be fixed in your release

"Chua Boon Yiang" <chuaby_at_hotmail.com> wrote in message news:87do47$k2t$1_at_newton.pacific.net.sg...
> Hi,
> in the statement :
> select
> DECODE (deptno,10, 'ACCOUNTING',
> 20, 'RESEARCH',
> 30, 'OPERATION',
> 40, 'OPERATION',
> 'NONE')
> count(*) from tableA
> group by deptno
>
> is there anyway for me to group by the decoded values rather than
> the original stored values ?
> eg i have 2 diff dept numbers, but i want to group them as 1 dept,
> using the above statement, there will be 2 rows of OPERATION.
> col alias cannot be used in the group by.
>
> Thanks
> Boon Yiang
>
>
Received on Fri Feb 11 2000 - 08:27:24 CST

Original text of this message

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