help needed in simple pl/sql procedure [message #321884] |
Wed, 21 May 2008 13:34  |
sri2005_05
Messages: 4 Registered: May 2008
|
Junior Member |
|
|
Can any one tell me whats wrong in below procedure..i just want to extract from one table and print in the output..
CREATE OR REPLACE PROCEDURE HYSXM.qa_packages_proc
IS
type ACCOUNT_TYPE is table of STG_ACCOUNT%ROWTYPE;
ACCOUNT_TYPE1 ACCOUNT_TYPE;
BEGIN
select * BULK COLLECT INTO ACCOUNT_TYPE1
from STG_ACCOUNT;
forall x in ACCOUNT_TYPE1.FIRST..ACCOUNT_TYPE1.LAST
LOOP
dbms_output.put_line(x);
--INSERT INTO QA_ACCOUNT2 VALUES(x);
END LOOP
/
END qa_packages_proc;
/
|
|
|
|
Re: help needed in simple pl/sql procedure [message #321899 is a reply to message #321886] |
Wed, 21 May 2008 14:52   |
sri2005_05
Messages: 4 Registered: May 2008
|
Junior Member |
|
|
Thanks,
But i want to print the data...Can any one tell how to do that
I tried below sql
select * BULK COLLECT INTO ACCOUNT_TYPE1
from STG_ACCOUNT;
forall x in ACCOUNT_TYPE1.FIRST..ACCOUNT_TYPE1.LAST
LOOP
dbms_output.put_line(x);
--INSERT INTO QA_ACCOUNT2 VALUES(x);
END LOOP
as
select * BULK COLLECT INTO ACCOUNT_TYPE1
from STG_ACCOUNT;
LOOP
dbms_output.put_line(ACCOUNT_TYPE1);
END LOOP
But its not working
|
|
|
|
|
Re: help needed in simple pl/sql procedure [message #321905 is a reply to message #321899] |
Wed, 21 May 2008 15:31  |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
sri2005_05 wrote on Wed, 21 May 2008 15:52 |
select * BULK COLLECT INTO ACCOUNT_TYPE1
from STG_ACCOUNT;
forall x in ACCOUNT_TYPE1.FIRST..ACCOUNT_TYPE1.LAST
LOOP
dbms_output.put_line(x);
--INSERT INTO QA_ACCOUNT2 VALUES(x);
END LOOP
as
select * BULK COLLECT INTO ACCOUNT_TYPE1
from STG_ACCOUNT;
LOOP
dbms_output.put_line(ACCOUNT_TYPE1);
END LOOP
|
This is invalid syntax all over the place. At least have the decency to post something that doesn't give oracle errors.
|
|
|