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: Complicated query: help please

Re: Complicated query: help please

From: Markus Fischer <mfischer_at_josefine.ben.tuwien.ac.at>
Date: Mon, 14 May 2001 22:55:59 GMT
Message-ID: <3oZL6.24817$2q.837978@news.chello.at>

"Sean Dolan" <nospam_at_nowhere.com> schrieb im Newsbeitrag news:9dp87302qbf_at_enews3.newsguy.com...
> Oracle 8.1.7 - I need help with a query.
>
> I currently have a query that obtains results like this through a group by
> clause:
>
> Name Status Count
> --------------------------------------------------
> bob Closed 18
> bob Help 23
> bob New 4
>
>
> I am trying to achieve:
>
> Name Closed Help New
> -------------------------------------------
> Bob 18 23 4

    I had to use such a setup too. Getting this back exactly as shown is to my knowledge not possible (at least not without using PL/SQL or maybe some kind of weird views).

But using eg. PHP (you didn't specify what language you're using) its quiet easy:

while( get row...)

    $data[ $row[ 'Name']][ $row[ 'Status']] = $row[ 'Count'];

HTH
- Markus Received on Mon May 14 2001 - 17:55:59 CDT

Original text of this message

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