Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a numeric value
Message
From
28/02/2005 02:24:37
 
 
To
21/02/2005 14:34:57
General information
Forum:
Oracle
Category:
Triggers, Sequences and Stored Procedures
Miscellaneous
Thread ID:
00988972
Message ID:
00991083
Views:
38
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform