here is my code ........
create or replace function supplier_total_charges(supnum IN OUT
supplies.s_num%type) return REAL IS
sump real;
BEGIN
select sum(ch_price * quantity) INTO sump
from supplier s,charges where supnum= s_num and p_num =
ch_p_num and s_num = ch_s_num;
return sump;
exception
when NO_DATA_FOUND then
DBMS_OUTPUT.PUT_LINE('Select did not return a tuple');
return 0;
end supplier_total_charges;
/
plz tell me wht stupid mistake am i make over here that i m getting this error give below ..thanks plz help me i m stuck over here ...
Errors for FUNCTION SUPPLIER_TOTAL_CHARGES:
LINE/COL ERROR
-------- -----------------------------------------------------------------
6/1 PL/SQL: SQL Statement ignored
7/60 PL/SQL: ORA-00904: "P_NUM": invalid identifier
masoodzia@hotmail.com
create or replace function supplier_total_charges(supnum IN OUT
supplies.s_num%type) return REAL IS
sump real;
BEGIN
select sum(ch_price * quantity) INTO sump
from supplier s,charges where supnum= s_num and p_num =
ch_p_num and s_num = ch_s_num;
return sump;
exception
when NO_DATA_FOUND then
DBMS_OUTPUT.PUT_LINE('Select did not return a tuple');
return 0;
end supplier_total_charges;
/
plz tell me wht stupid mistake am i make over here that i m getting this error give below ..thanks plz help me i m stuck over here ...
Errors for FUNCTION SUPPLIER_TOTAL_CHARGES:
LINE/COL ERROR
-------- -----------------------------------------------------------------
6/1 PL/SQL: SQL Statement ignored
7/60 PL/SQL: ORA-00904: "P_NUM": invalid identifier
masoodzia@hotmail.com