Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
please check out the following plsql function ...
it makes a ORA-06503: PL/SQL: Function returned without value error when i remove the commented lines , this when calling it on a parameter that makes the function returns some data

SQL
function doSomething (param integer) return clob AS
    returnedVal clob := '';
    parentID integer;
    
    begin
        select eb.someField into parentID  from someTable eb where (eb.someField = param);
         
         
      -- EXCEPTION
      --   WHEN NO_DATA_FOUND THEN
      --   return returnedVal  ;
         
                  
         return returnedVal ;
    end;
Posted
Updated 10-Oct-12 6:07am
v2
Comments
Sandeep Mewara 10-Oct-12 14:15pm    
What is 'NO_DATA_FOUND'?
Jörgen Andersson 10-Oct-12 15:52pm    
NO_DATA_FOUND is a predefined exception if the "select into" does not return any rows.
Sandeep Mewara 11-Oct-12 2:34am    
Thanks. :)
Jörgen Andersson 10-Oct-12 15:54pm    
I don't get what you're trying to achieve here, you don't set the returnval anywhere so the function can't return anything.
Banerjee Tanmoy 28-Dec-12 6:30am    
Please elaborate your question.
returnedVal clob := ''; that means return ''

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900