• spro1210 (2/28/2012)


    Choose a Job Description and increase by 10% all employees’ salaries that have the selected Job Description (not Job Title).

    But it's not coming out right. Any ideas?

    What does that mean? Are you updating the wrong rows? Is it failing with an error message?

    One of my problems is selecting only those employees with a selected job description.

    Where job_desc = 'some value you want to find'

    Does anybody know of where online I can go to help me with these as well?

    2. Decrease all Exempt employees’ salaries from a certain State by 15%.

    3. Increase all Non-Exempt employees’ salaries hired more than 3 years ago that are less than 30 years of Age, by 5%.

    Yes, SSC is a good location for learning sql. Since this is obviously homework we are NOT going to spoon feed you. As you said you can handle 4-7 so for 2 and 3, what have you tried?

    Keep in mind that we don't have your tables or know what columns are in them so when you post what you have tried you should also post some ddl (create table scripts) and sample data (insert statements). Take a look at the first link in my signature for best practices on posting questions.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/