Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple results from a table

Status
Not open for further replies.

Mousstifay

Programmer
May 19, 2004
8
FR
Hi everybody!

Here is my question and thanks for the answers.
I am checking from a table via a PL/SQL function the contents of a table:

function Main_chargement_dmt return number is
Le_chg_v TR_CHG_DMT%rowtype;
Ln_Code_Retour number;

Ex_Erreur_Appel_Fonction Exception;

BEGIN
begin
select *
into Le_Chg_V
from TR_CHG_DMT
where chg_eta = 'COLLECTEOK'
;
Ln_Code_Retour := Le_Chg_V.Chg_Num;
exception
when no_data_found then
Ln_Code_Retour := 0;
when too_many_rows then
Ln_Code_Retour := 0;
when others then
raise;
end;

return Ln_Code_Retour;
EXCEPTION

when others then
return sqlcode;
END Main_Chargement_dmt;

I call this package using a shell unix this way:
. tr_appel_sqlplus.sh pkg_tr_chargement.main_chargement_dmt"

My problem is that i want to be able to threat the case of multiple column return and in the shell get them one by one...
I hope i have been clear.Thanks for your help!
 
Hi,
Make use of Refcursor & Arrays.

Regards
Himanshu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top