If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Another Function question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-20-03, 13:23
syndee1 syndee1 is offline
Registered User
 
Join Date: Oct 2003
Posts: 6
Talking Another Function question

I hope I am not resubmitting this question, but I can't find my original submittal....

Here is another function problem that I have (luckily, the last). I hope there is someone out there who is bored and might want to give this one a try. If not, that's okay, I think completing 4 out of 5 questions is pretty good. hehe

Question:

Create a function (EMP_SAL_STATS) that computes the maximum salary for employees in the EMPLOYEES table. Note: do not use the built in function MAX. You must create your own MAX function.

In addition, create a driver program that runs the function. Show all work including the output from running the procedure.


My two lines of work (haha):
CREATE OR REPLACE FUNCTION emp_sal_stats
(p_employee_id employees.empoyee_id%TYPE)
Reply With Quote
  #2 (permalink)  
Old 10-20-03, 18:07
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Re: Another Function question

My one line of hint: Maybe you could order the data descending and then fetch one row?
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 10-21-03, 14:29
syndee1 syndee1 is offline
Registered User
 
Join Date: Oct 2003
Posts: 6
Thank you very much. I will give it a try.

Cyndi
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On