Results 1 to 6 of 6

Thread: Hire date and salary review date

  1. #1
    Geek_Guest
    Guest

    Hire date and salary review date

    Display each employee’s last name, hire date, and salary review date, which is the first Monday after six months of service. Label the column REVIEW. Format the dates to appear in the format similar to “Monday, the Thirty-First of July, 2000.”

    Question asked by visitor clipso


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Hire date and salary review date

    Kindly post what / how you have tried to solve the problem ,with your table structure.


  3. #3
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    Re: Hire date and salary review date

    Code:
    select Ename,Hiredate,
    TO_CHAR(NEXT_DAY(ADD_MONTHS(HIREDATE,6),'MONDAY') - 7,'DAY')||', the '||
    INITCAP(TO_CHAR(to_DATE(TO_CHAR(NEXT_DAY(ADD_MONTHS(HIREDATE,6),'MONDAY') - 7,'dd'),'J'),'JSP'))||' of '||
    INITCAP(TO_CHAR(NEXT_DAY(ADD_MONTHS(HIREDATE,6),'MONDAY') - 7,'MON'))||' '||
    (TO_CHAR(NEXT_DAY(ADD_MONTHS(HIREDATE,6),'MONDAY') - 7,'YYYY') Review
    From Emp;


    Last edited by debasisdas; 10-23-2007 at 02:21 AM. Reason: Formatted using code tags

  4. #4
    Junior Member
    Join Date
    Oct 2008
    Answers
    1

    Re: Hire date and salary review date

    SELECT ename,hiredate,
    TO_CHAR(NEXT_DAY(ADD_MONTHS(hiredate, 6), ’Monday’),’"Monday, the " fmDdspth "of" Month YYYY ’) "REVIEW"
    FROM emp;




  5. #5
    Contributing Member
    Join Date
    Sep 2007
    Answers
    35

    Re: Hire date and salary review date

    try the below query,

    select ename,hiredate,sal,
    to_char(next_day(trunc(add_months(hiredate,6),'mm'),'monday'),'DAY,"THE" DDSP "OF" MONTH YYYY') Review_date
    FROM emp.


  6. #6
    Junior Member
    Join Date
    Apr 2009
    Answers
    1

    Re: Hire date and salary review date

    Code:
    SELECT Ename,Hiredate,
    TO_CHAR(NEXT_DAY(ADD_MONTHS(HIREDATE,6),'MONDAY') - 7,'DAY')||', the '||
    INITCAP(TO_CHAR(to_DATE(TO_CHAR(NEXT_DAY(ADD_MONTHS(HIREDATE,6),'MONDAY') - 7,'dd'),'J'),'JSP'))||' of '||
    INITCAP(TO_CHAR(NEXT_DAY(ADD_MONTHS(HIREDATE,6),'MONDAY') - 7,'MON'))||' '||
    (TO_CHAR(NEXT_DAY(ADD_MONTHS(HIREDATE,6),'MONDAY') - 7,'YYYY') Review
    FROM Emp;


    Last edited by debasisdas; 04-27-2009 at 10:11 AM. Reason: added code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact