Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Oracle (http://www.go4expert.com/forums/oracle-forum/)
-   -   Such A Newbie - Need to Use a Salary Range to Give Employee Salary Grade (http://www.go4expert.com/forums/newbie-salary-range-employee-salary-t7239/)

Prosdo 10Nov2007 05:41

Such A Newbie - Need to Use a Salary Range to Give Employee Salary Grade
 
Okay guys, don't laugh too hard lol. I am taking a class on SQL. I am very new to it. My assignment says this.

3. Display grade_id, last_name, and salary of all employees. Sort by grade_id and salary. You will need to use salary to determine what grade the employee falls into.

This is the code I have so far:
SELECT LAST_NAME, GRADE_ID, SALARY
FROM DEMO.EMPLOYEE, DEMO.SALARY_GRADE
ORDER BY last_name

Here is a photo of the tables I am working with:
EMPLOYEE TABLE
http://i7.photobucket.com/albums/y26...o/EMPLOYEE.jpg

SALARY GRADE
http://i7.photobucket.com/albums/y26...ALARYGRADE.jpg

How do I translate in code that I want SQL to take the employee's salary and put it in between a range of salary to determine the grade? Sorry I know it's probably something very simple.

Prosdo 11Nov2007 00:47

Re: Such A Newbie - Need to Use a Salary Range to Give Employee Salary Grade
 
Figured this one out.


All times are GMT +5.5. The time now is 09:50.