LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-02-2002, 10:57 AM   #1
kb2010
LQ Newbie
 
Registered: Sep 2002
Posts: 4

Rep: Reputation: 0
PL/SQL secario


i cant get this question anyone have any ideas?

The scenario is: the trustee of the company in
question are unhappy that the commission earned by the employees is somewhat adhoc.
They want to link the commission of an employee to his/her performance in the
following manner: each employee gets as commission 10% of the total commission
earned by people s/he directly supervises. Accordingly, only employees who do not
supervise anyone will get the commission listed in the employee table. (Unlisted
commission will be treated as 0 for this purpose.) Commission of other employees
will be recalculated and displayed, again listing the EmployeeID, first name, last
name and revised commission, in the ascending order of last names. Eg.
SQL> exec HRManage.Scenario;
222: Sunny Chen-- 0
543: Derek Dev-- 0
135: Stanley Garner-- 300
...


given
--------
The package HRManage consists of the following procedures and functions.
PROCEDURE AddBob;
PROCEDURE AddDependent(in_emp_id IN Employee.EmployeeID%TYPE,
in_emp_rel IN Dependent.Relation%TYPE,
in_rel_dob IN varchar2);
PROCEDURE JobChange(in_emp_id IN Employee.EmployeeId%TYPE,
in_last_name IN Employee.Lname%TYPE,
in_first_init IN char);
FUNCTION Is_Manager(in_emp_id IN employee.EmployeeId%TYPE)
RETURN BOOLEAN;
FUNCTION Calculate_Payout(in_emp_id IN Employee.EmployeeId%TYPE)
RETURN NUMBER;
PROCEDURE Fire_Employee(in_emp_id IN Employee.EmployeeId%TYPE);
PROCEDURE Underlings(in_emp_id IN Employee.EmployeeId%TYPE);
PROCEDURE Scenario;
 
Old 10-09-2002, 06:48 PM   #2
Gilgongo
LQ Newbie
 
Registered: Sep 2002
Location: Grimsby, UK
Distribution: Fedora 12/#!/ OpenSuse 11/MythBuntu
Posts: 7

Rep: Reputation: 0
The question you ask is unlikely to attract the attention of programmers who will be able to supply you with an answer, especialy because you do not supply the code for the functions and procedures mentioned..

There is however a logic problem which you hint at which seems interesting if only because of the comment you make about the trustee of the company being unhappy.

If you want to use a database solution to solve your problem there are many ways of doing this and it has all been done b4.

I could tell you but then I'd probably have to rtfm myself.

DGOTDYWFY
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM
Which SQL is suitable for EMbedded SQL on C? hk_michael Programming 4 01-10-2005 05:07 PM
My SQL and M$SQL ikw38 Linux - Software 2 07-03-2003 01:45 PM
sql k3v0 Linux - Software 2 12-26-2002 04:52 PM
Better SQL ???? m1ke Linux - General 7 12-14-2001 09:32 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration