1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Such A Newbie - Need to Use a Salary Range to Give Employee Salary Grade

Discussion in 'Oracle' started by Prosdo, Nov 10, 2007.

  1. Prosdo

    Prosdo New Member

    Joined:
    Nov 7, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    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
    [​IMG]

    SALARY GRADE
    [​IMG]

    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.
     
  2. Prosdo

    Prosdo New Member

    Joined:
    Nov 7, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Figured this one out.
     

Share This Page