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

Home -> Community -> Usenet -> c.d.o.misc -> What's wrong in my code, Any idea

What's wrong in my code, Any idea

From: Areon Ku <chsingh_at_yahoo.com>
Date: Wed, 16 Jul 2003 15:06:36 -0400
Message-ID: <bf47nq$t4a$1@usenet01.srv.cis.pitt.edu>


Can any one give suggesstion here :

CREATE OR REPLACE procedure TestCount_sum(

Organ_tx varchar2,

temp_name varchar2,

category_TX varchar2)IS

v_category_tx varchar2(32);

v_ORGAN_TX VARCHAR2(32);

v_value_tx varchar2(32);

v_datestamp date;

sqlstatement varchar2(300);

I VARCHAR2(1000); begin

V_organ_tx :=XXXXX;

for n in (select COLUMN_NAME from category where column_name in (x,y,z,r,t) loop

declare cursor i is

select distinct n.column_name from v_sum_demo_surg_block where v_category_tx=v_category_tx;

begin

open i;

loop

fetch i into v_value_tx;

exit when i%notfound;

--Want to do some additional calculation( count, percentages etc etc) on these distinct values in insert into the table--

insert into sum_DISC_TX (organ_tx, sum_id, datestamp, value_tx)

values (v_Organ_tx,seq_sum_id.nextval, to_char(sysdate, 'MM/DD/YYYY'),v_value_tx);

end loop;

end loop;

end loop;

end;

/ Received on Wed Jul 16 2003 - 14:06:36 CDT

Original text of this message

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