Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Crosstab Query
I have a table with the columns as shown below:
<My_table>
unemp varchar2(1)
isdereg varchar2(1)
exp date
rereg_dte date
renel_dte date
How to i select a crosstab query that will calculate total no. in NewReg where unemp='0' and so on.
unemp NewReg Re_Reg Renew_Reg
0 total total total
1
2
3
4
5
where the conditon for:
NewReg => isdereg ='N' and exp > sysdate
rereg_dte and renl_dte is null
Re_reg => isdereg='N' and exp > sysdate
rereg_dte is not null
Renew_reg => isdereg='N' and exp > sysdate
renl_dte is not null
--
Sok Peng
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Mon Sep 28 1998 - 02:49:17 CDT