|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Trigger questionHi,
Using the HSQLdb 1,9 engine embedded in a early OpenOffice.org Base 3.3 build I'm trying to set a trigger on a table that will update a timestamp column with the CURRENT_TIMESTAMP when any update is made to the table: So my table and trigger statements are: CREATE TABLE category ( category_id IDENTITY PRIMARY KEY, name VARCHAR(25) NOT NULL, last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL ); CREATE TRIGGER category_last_upate BEFORE UPDATE ON category REFERENCING new ROW AS newrow FOR EACH ROW set newrow.last_update = CURRENT_TIMESTAMP; The trigger statement is accepted and no error is generated at run time, but no action is performed by the trigger either. I figure I'm just being dense here and missing something simple - any help would be much appreciated. Thanks Drew Jensen ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
|
|
Re: Trigger questionThanks Drew,
I'll be looking at this today and a fix will be available from OOo very soon if needed. Fred On Mon, 19 Oct 2009 17:37 -0400, "Drew Jensen" <drew@...> wrote: > Hi, > > Using the HSQLdb 1,9 engine embedded in a early OpenOffice.org Base 3.3 > build I'm trying to set a trigger on a table that will update a > timestamp column with the CURRENT_TIMESTAMP when any update is made to > the table: > > So my table and trigger statements are: > > CREATE TABLE category ( > category_id IDENTITY PRIMARY KEY, > name VARCHAR(25) NOT NULL, > last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL > ); > > CREATE TRIGGER category_last_upate BEFORE UPDATE ON category REFERENCING > new ROW AS newrow FOR EACH ROW set newrow.last_update = > CURRENT_TIMESTAMP; > > The trigger statement is accepted and no error is generated at run time, > but no action is performed by the trigger either. > > I figure I'm just being dense here and missing something simple - any > help would be much appreciated. > > Thanks > > Drew Jensen > > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Hsqldb-user mailing list > Hsqldb-user@... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Hsqldb-user mailing list Hsqldb-user@... https://lists.sourceforge.net/lists/listinfo/hsqldb-user |
| Free embeddable forum powered by Nabble | Forum Help |