Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to create the procedure??

How to create the procedure??

From: Violin <violin.hsiao_at_mail.pouchen.com.tw>
Date: Mon, 10 Aug 1998 08:58:42 GMT
Message-ID: <35ceb0a8.10263278@news.twsc.pouchen.com.tw>


Hello,
I have a table named "ACCD" and data:
 DATE ACC_NO DC AMT
----------- --------------- ----- ---------

961004  111101       D         1540
961003  111105       D         3068
961004  111101       C            992
961004  111106       D         5300
961002  111101       D           935
961007  111104       D         7752
961009  111101       D         2172
961003  111102       C         8493
961008  111101       C           318
961007  111104       C           468
961006  111101       C           660
961005  111103       C           995
961009  111102       D           665
961008  111102       C       25949

I want to create a procedure with pass in start-of-date and end-of-date,
then response sort by DATE,group by ACC_NO,each ACC_NO counts sum(D_AMT) where DC='D',sum(C_AMT) where DC='C'

 like this:
 DATE ACC_NO D_ AMT C_AMT
----------- --------------- ------------- -----------

961002  111101                935                0
961003  111102                     0         8493
961003  111105              3068                0
961004  111101               1540          992
961004  111106               5300               0
961005  111103                      0          995
961006  111101                      0          660 
961007  111104               7752          468

   ::::::::::::

REALLY NEED HELP!!
How could I do with this???
Please give me some suggestion,Thank you billions! Please Cc to : violin.hsiao_at_mail.pouchen.com.tw,Thank you :) Received on Mon Aug 10 1998 - 03:58:42 CDT

Original text of this message

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