Home » SQL & PL/SQL » SQL & PL/SQL » Procedure (Version 10.2)
Procedure [message #412512] Thu, 09 July 2009 14:47 Go to next message
AnnaOracle
Messages: 6
Registered: July 2009
Junior Member
Hello All,
taking a mentoring learning class w/o any mentors,

got stuk here:
CREATE OR REPLACE PROCEDURE GET_SALARY
( V_EMP_ID in STAFF.ID%TYPE,
V_SALARY out STAFF.SALARY%TYPE)
IS BEGIN
SELECT SALARY INTO V_SALARY
FROM STAFF
WHERE ID = V_EMP_ID;
END GET_SALARY;

error:

SQL> EXEC GET_SALARY(360,:g_salary);
BEGIN GET_SALARY(360,:g_salary); END;
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "SYSTEM.GET_SALARY", line 5
ORA-06512: at line 1

Also, are there any GUI tools like the development center in DB2?

Thanks a lot!
Anna.
Re: Procedure [message #412514 is a reply to message #412512] Thu, 09 July 2009 14:50 Go to previous messageGo to next message
BlackSwan
Messages: 25035
Registered: January 2009
Location: SoCal
Senior Member
>Also, are there any GUI tools like the development center in DB2?
GUI won't solve PEBKAC induced situations.
Get JDeveloper from http://otn.oracle.com

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.


which user owns table SALARY; likely not SYSTEM.

You really,really should not be running as SYSTEM user.
Re: Procedure [message #412515 is a reply to message #412512] Thu, 09 July 2009 14:53 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
ORA-01403: no data found

No row satisfies the condition you provided.

Regards
Michel
Re: Procedure [message #412518 is a reply to message #412515] Thu, 09 July 2009 15:09 Go to previous messageGo to next message
AnnaOracle
Messages: 6
Registered: July 2009
Junior Member
thanks
it's not a test env created to practice
Re: Procedure [message #412521 is a reply to message #412518] Thu, 09 July 2009 15:13 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
AnnaOracle wrote on Thu, 09 July 2009 16:09

it's not a test env created to practice


What does this mean?
Re: Procedure [message #412550 is a reply to message #412512] Thu, 09 July 2009 23:50 Go to previous messageGo to next message
ashoka_bl
Messages: 398
Registered: November 2006
Location: Bangalore
Senior Member

Quote:

taking a mentoring learning class w/o any mentors,



Take a look at your table and see whether emp_id 360 is present or not,

And read about how to handle errors, read Exception handling.
Re: Procedure [message #412685 is a reply to message #412550] Fri, 10 July 2009 10:51 Go to previous message
AnnaOracle
Messages: 6
Registered: July 2009
Junior Member
thanks for all your help
Previous Topic: Query for group by period
Next Topic: PLSQL Word Mail Merge
Goto Forum:
  


Current Time: Sat Dec 03 14:17:00 CST 2016

Total time taken to generate the page: 0.04083 seconds