DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: ORA -1847 day of month must be between 1 and last day of month

  1. #1
    Join Date
    Aug 2000

    ORA -1847 day of month must be between 1 and last day of month


    Im trying to debug a troublesome trigger.

    In my when clause im using this type of logic....

    nvl(old.cust_flag, 'z') <> nvl(new.cust_flag,'z') or
    nvl(old.last_updated_by, 99999) <> nvl(new.last_updated_by,99999) or


    but im having problems with the date format by this i mean

    nvl(old.last_update,'9999') <> nvl(new.last_update,'9999')

    Table Struct

    cust_flag = VARCHAR150
    last_updated_by = Number 15
    last_update = Date

    The problem is prob the format (ie '9999) above) but im not too sure what to put in when referencing a date???

    I really hope someone can help...

    Thanks in Advacne to anyone who can...
    Carpe Diem

  2. #2
    Join Date
    Dec 2002
    Bangalore,Karnataka, India
    Hi Barabas,

    When you are giving nvl for a date field, system expects the default value to be in conformance with the default date format as specified by NLS_DATE_FORMAT.

    Her eyou may try as:
    nvl(old.last_update, sysdate) <> nvl(new.last_update,sysdate)



  3. #3
    Join Date
    Aug 2000
    Hi Eldo

    I tried that, & it worked. Thanks for the help & explaination...
    Carpe Diem

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