Decode & Group By
From: Lez Oxley <lezo_at_central.susx.ac.uk>
Date: 12 Apr 1994 18:15:11 GMT
Message-ID: <2oeoff$coj_at_infa.central.susx.ac.uk>
group by this,that,<and essentially what decodes in to column c1>;
Date: 12 Apr 1994 18:15:11 GMT
Message-ID: <2oeoff$coj_at_infa.central.susx.ac.uk>
Hi
Is there anyway of doing a 'group by' on the result of a 'decode' function without creating a view first.
eg. select
this, that, decode(a.attribute1,0,'NOT SPECIFIED',b.attribute2) c1 from tab1 a, tab2 b
group by this,that,<and essentially what decodes in to column c1>;
Lez
PS. What I'm actually working on is a SQL*PLUS script to show in a hierachical
kind of format, the Oracle V6/Menu 5 Menu Roles associated with each Menu (option) choice - any one got a script which does a similar job?
-- Lez Oxley, Deputy ACS Manager and Database Administrator Administration, University of Sussex, Falmer, Brighton, BN1 9RH, UK Tel: +44 273 606755 x3808 Fax: +44 273 678335 EMAIL: L.Oxley_at_sussex.ac.ukReceived on Tue Apr 12 1994 - 20:15:11 CEST