Home » Developer & Programmer » Forms » POST-CHANGE trigger
POST-CHANGE trigger [message #224729] Thu, 15 March 2007 04:42 Go to next message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
Hello
I have another problem :/ This time is problem with this code:


declare
  day char(2);
begin
        select
           to_char(to_date(:k.day||:k.month||:k.year,'YYYY-MM-DD'),'DD')
        into day from sys.dual;
        select decode(day'1','Sunday',
                             '2','Monday','3','Tuesday',
                             '4','Wednesday', '5','Thursday',
                             '6','Friday','7','Saturday','INNY-NIEZNANY')
        into :k.day_week from sys.dual;
end;


This is the source of POST-CHANGE trigger. When I try make F7 on my form and write some query, there is :

FRM-40735 POST-CHANGE trigger raised unhandled exception ORA-06502
and after that, data show.

I know that is problem with date format, but I can't see where.
Please could you show me my mistake.
Tahnk you.
Re: POST-CHANGE trigger [message #224735 is a reply to message #224729] Thu, 15 March 2007 05:02 Go to previous message
Catty
Messages: 64
Registered: April 2006
Location: Poland
Member
Ok it doesn't matter. I have just found my error. This String "'INNY-NIEZNANY'" was too long to insert it into variable day. Smile
Previous Topic: How to execute query on insert mode
Next Topic: Error in Validation
Goto Forum:
  


Current Time: Sat Feb 08 18:39:50 CST 2025