PL/SQL Function convert from Date of Birth to Age
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: PL/SQL Function convert from Date of Birth to Age

Hybrid View

  1. #1
    Join Date
    Oct 2013
    Posts
    1

    Red face PL/SQL Function convert from Date of Birth to Age

    Hi - I am a newbie LOL

    I'm stuck on a project here

    And, not sure if this was discussed before and pardon me if it was discussed before

    I have Employee table with the following fields:

    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    EMPLOYEE_ID NOT NULL NUMBER(4)
    FIRST_NAME NOT NULL VARCHAR2(15)
    MIDDLE_INITIAL VARCHAR2(1)
    LAST_NAME NOT NULL VARCHAR2(15)
    SEX NOT NULL CHAR(1)
    MANAGER_ID NUMBER(4)
    HIRE_DATE DATE
    SALARY NUMBER(7,2)
    COMMISSION NUMBER(7,2)
    JOB_CODE NUMBER(2)
    DOB DATE

    Need to create a function called AGE to calculate an age (integer) based on Birthdate (DOB). I would appreciate if anyone here in this forum can help.

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    googling for 'calculate age from DOB oracle' returns many hits with solutions

  3. #3
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,469
    .
    Perhaps his Google is broken, here ... he can use mine: GOOGLE
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width