Subject Re: [firebird-support] Trying to save the current record before updating...
Author Fabian Chocron
Thanks!! It helps!
Cheers,
Fabian


--- "emel.hu" <emel@...> wrote:

>
> > I would like to save the current record before
> updating on a table,
>
> see this: http://www.emel.hu/ibfb/ibfb_002.html
>
> eMeL
>
>
> > so I have a Trigger on Update, Before Update:
> >
> > AS
> > BEGIN
> > INSERT INTO INVOICE_LOG
> > SELECT OLD.* , CURRENT_DATE , CURRENT_TIME
> > FROM INVOICE INV
> > WHERE INV.ID = OLD.ID ;
> > END
> >
> > This works OK, however shouldn't it be:
> >
> >
> > AS
> > BEGIN
> > INSERT INTO INVOICE_LOG
> > VALUES OLD.* , CURRENT_DATE , CURRENT_TIME ;
> > END
> >
> > Of course this one does not work, So I am trying
> to understand why?
> >
> > ISC ERROR CODE:335544569
> > ISC ERROR MESSAGE:
> > Dynamic SQL Error
> > SQL error code = -104
> > Token unknown - line 5, char 11
> > OLD
>


Fabian Chocron

This correspondence is for the named person's use only. It may contain confidential or legally privileged information or both
No confidentiality or privilege is waived or lost by any miss transmission. If you receive this correspondence in error,
please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this
correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender,
except where the sender expressly, and with authority, states them to be the views of: “IT Bizolutions Pty. Ltd.”



____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs