File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Joined: Nov 24, 2005
Nov 24, 2005 00:28:00
here is my code ........
create or replace function supplier_total_charges(supnum IN OUT
supplies.s_num%type) return REAL IS
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;
when NO_DATA_FOUND then
DBMS_OUTPUT.PUT_LINE('Select did not return a tuple');
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:
6/1 PL/SQL: SQL Statement ignored
7/60 PL/SQL: ORA-00904: "P_NUM": invalid identifier
Joined: Aug 15, 2004
Nov 24, 2005 01:07:00
Welcome to the Javaranch.
Try to use table aliases with the column names in your
[ November 24, 2005: Message edited by: Adeel Ansari ]
Joined: Nov 20, 2005
Nov 24, 2005 06:27:00
Hi Masood ,
it seems to me that P_NUM is neither any attribute nor defined var in the block.
confirm this thing and have a check.
it should solve the prob.
No doubt, using table-alias will make it clear - to - understand ur code ( courtesy Adeel bhai ).
I agree. Here's the link:
subject: pl/sql error
function call within a procedure error !!
PL/SQL PLS-00905 Object is invalid error
error in Oracle function
Execute pl/sql function which is having bind variables in java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014