Home » Other » Training & Certification » Create a procedure to increase
icon9.gif  Create a procedure to increase [message #321836] Wed, 21 May 2008 08:08 Go to next message
amritaseema
Messages: 47
Registered: January 2008
Member
HI can any one please help me out...
I have doubt in this question..
Create a procedure which is used to increase the salary of all employees who work in the department given by the procedure’s parameter. The percentage of the salary increase is given by a parameter.

Thanks in advance
Seema
Re: Create a procedure to increase [message #321838 is a reply to message #321836] Wed, 21 May 2008 08:11 Go to previous messageGo to next message
Michel Cadot
Messages: 59427
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post what you already tried and if it does not work post the reason.

Regards
Michel
Re: Create a procedure to increase [message #321842 is a reply to message #321838] Wed, 21 May 2008 08:35 Go to previous messageGo to next message
amritaseema
Messages: 47
Registered: January 2008
Member
Hi sir i am not getting it properly..
what ever i understand i wrote the code...

CREATE OR REPLACE PROCEDURE empupdate (
   p_deptid    IN       NUMBER := '&DepartmentNo',
   p_empname   OUT      VARCHAR2,
   p_jobid     OUT      VARCHAR2,
   v_salary    OUT      NUMBER,
   p_per       IN 		Number:='$sal_increase'
)
AS
   v_variable   VARCHAR2 (30);
BEGIN
   SELECT salary
     INTO v_salary
     FROM employees;
   IF p_deptid=department_id
   THEN
      v_salary=v_salary+p_per
      DBMS_OUTPUT.put_line (p_empname || '' || v_salary);
   END IF;
END;
Re: Create a procedure to increase [message #321844 is a reply to message #321836] Wed, 21 May 2008 08:52 Go to previous messageGo to next message
BlackSwan
Messages: 22911
Registered: January 2009
Senior Member
Nice code formatting.

Now fix the syntax errors.
icon9.gif  Re: Create a procedure to increase [message #321956 is a reply to message #321844] Wed, 21 May 2008 23:08 Go to previous messageGo to next message
amritaseema
Messages: 47
Registered: January 2008
Member
Hi sir can you please help me out...
i am not getting it Sad Sad Sad Sad
Re: Create a procedure to increase [message #321961 is a reply to message #321836] Wed, 21 May 2008 23:24 Go to previous message
BlackSwan
Messages: 22911
Registered: January 2009
Senior Member
When all else fail, you could just Read The Fine Manual.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm

Are you unwilling or incapable of reading & understanding the Fine Manual?
Previous Topic: Oracle 10G
Next Topic: Index Table
Goto Forum:
  


Current Time: Sat Oct 25 02:14:24 CDT 2014

Total time taken to generate the page: 0.11564 seconds