Horizontal counting?


I would like to run a query that counts by case_manager, number of distinct app_id's that have a status ='AC' in a select number of programs. of the fields are in the same table.

I want it to look like this:

Case Mgr A D YY OY
Jane 1 3 42 0
John 3 4 5 2
Alice 1 2 3 3

Fields are case_manager, status, applicant, and program
table reg

I can do the count command to find the total of all active people for each region code. What I want it for the breakdown by program the people are in.

My query for that is:
SELECT case_manager, Count (*)
from reg
where status='AC'
Group by case_manager
order by case_manager
and I get this:
Case Manager Count *
Jane 46
John 14
Alice 9
Posted On: Monday 31st of December 2012 01:13:06 AM Total Views:  153
View Complete with Replies

RELATED TOPICS OF Oracle PROGRAMMING LANGUAGE




Maximum limit Exceeded Error

Hi all, \t\t I am facing a problem in my Web Application. when try to insert a bulk data in the database, i am getting Error like ORA-00020: maximum number of processes (%s) exceeded . i am using Orcale 9i as database. what could be the problem. how can i sort it out.
VIEWS ON THIS POST

123

Posted on:

Wednesday 7th November 2012
View Replies!