Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    9

    Unanswered: My trigger still not working...

    Hi,


    i have already posted and got help from hings..but still i have a problem
    pls help me....

    i have table reservation where cancellation date is initially null

    when i want to update cancellation date...

    it should check following condition....

    select reservationid from reservation where
    floor ((startdatetime - cancellationdatetime)*24) -
    floor(startdatetime - cancellationdatetime)*24
    <
    48;

    this checks for condition whether person has cancel before 48hrs or not

    if he hasnt cancelled before 48hrs....

    i should insert a tuple...

    pls help me.....

    CREATE OR REPLACE trigger Trigger2
    AFTER UPDATE OF cancellationdatetime ON reservation
    FOR EACH ROW
    DECLARE

    BEGIN
    -- i want to insert a tuple when par
    -- i should check for condition here
    -- select reservationid from reservation where
    --floor ((startdatetime - cancellationdatetime)*24) -
    --floor(startdatetime - cancellationdatetime)*24
    --<
    --48; how to do this..i want insert when i satisfy this condition....


    INSERT INTO charges VALUES (TO_DATE('12/09/2003-23-23-23','MM/DD/YYYY-HH24-MI-SS'),'FINE',50.00,4);


    END;
    /

    thanx ....

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    My crystal ball is broken.
    There can be many, many, many reasons why
    "My trigger still not working"
    You provided absolutely NO indication about EXACTLY what is wrong.
    You're On Your Own (YOYO)!

  3. #3
    Join Date
    Apr 2003
    Location
    Minneapolis, MN
    Posts
    273
    Hi deepangunalan,

    Is it logical error in coding or syntectical error?
    Bhavin

    MS Computer Science
    OCP DBA 9i/8i

Posting Permissions

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