Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2008
    Posts
    1

    Red face Unanswered: can't update table

    CREATE OR REPLACE TRIGGER MAPINFO.log_olusturma_update
    before update
    ON MAPINFO.NOKTALAR for each row
    declare
    logid number;
    temp_tarih number;
    begin
    if sys_context('USERENV','HOST') not in ('GVG\GVGSRV','GVGSRV','gvgsrv') then
    if (:new.tarih = 0) or (:new.tarih is null) then
    SELECT to_number(to_char(sysdate, 'YYYYMMDD') ) tarih into :new.tarih_3 from dual ;
    end if;
    if (:new.saat is null) or (:new.saat='') or (:new.saat=' ') then
    SELECT to_char(sysdate, 'HH24:MiS') saat into :new.saat_3 from dual;
    end if;
    if (:new.tarih = ld.tarih) and (:new.saat = ld.saat) and (:OLD.RUHSATLI=:NEW.RUHSATLI) then
    SELECT to_number(to_char(sysdate, 'YYYYMMDD') ) tarih into :new.tarih_3 from dual ;

    i couldn't update the table
    and i get these errors
    ORA-06502
    ORA-06512
    ORA-04088
    and output writes the last select statement of the trigger that i write above cause the error

    does somebody knows why i can't update the table.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    You have the complete trigger code & can not understand what is wrong.

    Why do you expect anyone to be able to debug you code when you choose to not provide the complete trigger & only truncated error output?

    All things considered, the trigger contains invalid PL/SQL.
    Does it contain EXECUTE IMMEDIATE?

    You're On Your Own (YOYO)!
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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