Capturing OLD and NEW values from the Parameter of a sored procedure [message #610315] |
Wed, 19 March 2014 06:52 |
|
mapps0999@gmail.com
Messages: 19 Registered: October 2013 Location: Bangalore
|
Junior Member |
|
|
Hi All,
I have a procedure where a pass couple of in parameters such quote header id ,... and based on the value of quote header id it gives output pare metes values such response time , part replacement time etc .
My question is that when i rerun the same procedure for the same quote header id and then out put parameter values are different then i want to capture the values of of both old and new and set a flag e.g:- Y or N .
Here is an example :-
SET SERVEROUTPUT ON
DECLARE
v_msg VARCHAR2 (2000);
v_cde VARCHAR2 (2000);
v_sl_response_time VARCHAR2 (2000);
v_sl_part_replace VARCHAR2 (2000);
BEGIN
XX_SERVICE_TEST (p_quote_header_id =>18591601,
x_sl_response_time =>v_sl_response_time,
x_sl_part_replace =>v_sl_part_replace,);
DBMS_OUTPUT.put_line ('Response Time-'||v_sl_response_time);
DBMS_OUTPUT.put_line ('Part Replace-'||v_sl_part_replace);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLERRM);
END;
Here is my output when run it quote header if 9765:-
anonymous block completed
Response Time-2
Part Replace-2
Here is my Out put value when i run it for the second time for the quote header id 9765 -
anonymous block completed
Response Time-1
Part Replace-1
.
Now as the out put parameters values different for the same quote header id when i rerun the procedure
i want set falg as 'Y' otherwise 'N' and return that value .
Regard,
Mike
|
|
|
|
|
|
|
|
|
|
|
|
|
|