Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Triggers and ESQL

Triggers and ESQL

From: martinl <laflamme_at_iname.com>
Date: Sun, 28 Nov 1999 10:27:09 -0500
Message-ID: <ZNb04.24$pe5.3113@weber.videotron.net>


Greetings to all,

    I'm trying to use triggers with ESQL and I have a small problem: it doesn't work. In order to trace down the problem, I've simplified my trigger definition as much as I could and I ended up with the following dumb-looking function:

void createTriggers()
{

    EXEC SQL CREATE TRIGGER give_bonus
    AFTER UPDATE OF desk ON offices
    FOR EACH ROW WHEN capacity > 1000
    BEGIN
        UPDATE offices SET floor = 3 + 1;     END;
}

    Unfortunately for me, even this very simple function doesn't work. The precompiler always gives me this error:

    PCC-S-02022, Found end of file while scanning a SQL statement

    I was wondering if there is anything I need to declare in the DECLARE SECTION, or anywhere else for that matter, whenever I use triggers with ESQL. Since I haven't, maybe that is why the precompiler always complains. Anybody has a clue about why it doesn't work?

    Thanks for any help,
    Martin Received on Sun Nov 28 1999 - 09:27:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US