CREATE OR REPLACE
PROCEDURE sp_insert_regtracking(
username_var OUT VARCHAR2,
fee_var OUT NUMBER,
count_records out integer
)
AS
BEGIN
select count(*) into count_records
FROM LNK_REGISTRATION_TOUR
WHERE (USERNAME NOT IN
(SELECT USERNAME FROM ILTER_REGISTRATION_TRACKING
));
return count_records;
SELECT USERNAME
INTO username_var
FROM LNK_REGISTRATION_TOUR
WHERE (USERNAME NOT IN
(SELECT USERNAME FROM ILTER_REGISTRATION_TRACKING
));
SELECT SUM(FEE)
INTO fee_var
FROM LNK_REGISTRATION_TOUR
WHERE (USERNAME NOT IN
(SELECT USERNAME FROM ILTER_REGISTRATION_TRACKING
));
INSERT
INTO ilter_registration_tracking
(
username,
total_fee,
currency
)
VALUES
(
username_var,
fee_var,
'Dollars'
);;
|