Hi,
I have an exception in a package I have created. The package compiles fine but when I test it nothing is returned. I want TEXT 'NULL' to be returned as I'll use this in a lookup later on.
EXCEPTION WHEN no_data_found THEN
v_Passangers :='NULL';
v_Third_Party :='NULL';
v_Witnesses :='NULL';
v_Authorities :='NULL';
begin
MyPackage.Load_Context_1(355271);
dbms_output.put_line('v_Passangers : '||MyPackage.v_Passangers );
dbms_output.put_line('v_Third_Party : '||MyPackage.v_Third_Party );
dbms_output.put_line('v_Witnesses : '||MyPackage.v_Witnesses );
dbms_output.put_line('v_Authorities : '||MyPackage.v_Authorities );
end;
RETURNS:
v_Passangers:
v_Third_Party:
v_Witnesses:
v_Authorities:
I Would Like:
v_Passangers: NULL
v_Third_Party: NULL
v_Witnesses: NULL
v_Authorities: NULL
Thanks!!!
Variables are defined as varchar2(100) in the package and are 'Selected into' in the package body in the procedure PROCEDURE Load_Context_1(ID in number);
NO_DATA_FOUND is occurring because ID 355271 that I pass sits in the database on a table and the data that I select into the V_Variables is not present.
I realize that 'NULL' is not the best text word to use but for the purposes of this question please humour me.
Banner:
Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE 11.2.0.2.0 Production"
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production