Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning a numeric value
Message
De
28/02/2005 02:24:37
 
 
À
21/02/2005 14:34:57
Information générale
Forum:
Oracle
Catégorie:
Déclencheurs, séquences et procédures stockées
Divers
Thread ID:
00988972
Message ID:
00991083
Vues:
41
This message has been marked as a message which has helped to the initial question of the thread.
Hi,

Easiest way is with a function although stored procs work. I think there is some links about it here somepleace. But off the top of my head something like below will work..


LOCAL lnFirstNo, lnSecondNo, lnReturnNo
lnFirstNo = 10
lnSecondNo = 15
lnReturnNo = 0

lcSqlStatement = "select Add_Two_Val(?lnFirstNo, ?lnSecondNo, ?lnReturnNo) ReturnVal from dual"
lnConHndl = sqlexec(lnSatHandle, lcSqlStatement,"Add_Two_Val")

lnReturnNo=Add_Two_Val.ReturnVal

CREATE OR REPLACE FUNCTION Add_Two_Val(
pnFirstNum NUMBER,
pnSecondNum NUMBER) RETURN NUMBER IS
BEGIN
RETURN pnFirstNum + pnSecondNum;
END;
/


HTH
Tim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform