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

Complicated query: help please

From: Sean Dolan <nospam_at_nowhere.com>
Date: Mon, 14 May 2001 12:29:18 -0600
Message-ID: <9dp87302qbf@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

Easy if you know how many columns to build for (like "Closed", "Help", "New") and you can build a function that does a count on each status... but what if a 4th gets added ? What query takes this into account and gets the results in the format I am looking for?

Thanks,
Sean Received on Mon May 14 2001 - 13:29:18 CDT

Original text of this message

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