Looking for TRIGGER Sample

Discuss the database features

Looking for TRIGGER Sample

Postby dreamquartz » Mon Feb 13, 2017 5:21 am

Hi All,

I looking for examples of working TRIGGERS, and specifically for situations where a VIEW is included.
I cannot seem to find anything in literature.

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 663
Joined: Mon May 30, 2011 4:02 am

Re: Looking for TRIGGER Sample

Postby dreamquartz » Thu Mar 23, 2017 8:31 am

dreamquartz wrote:Hi All,

I looking for examples of working TRIGGERS, and specifically for situations where a VIEW is included.
I cannot seem to find anything in literature.

Dream

Even with one of the nastiest problems solved (see https://forum.openoffice.org/en/forum/viewtopic.php?f=13&t=86906) I am still looking for examples to help to create different types of TRIGGERS, and especially to be used with VIEWS.
Does anyone know where to find good examples, and/or reference material?

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 663
Joined: Mon May 30, 2011 4:02 am

Re: Looking for TRIGGER Sample

Postby eremmel » Thu Mar 23, 2017 1:07 pm

I assume particular for HSQLDB 2.x...
As I told you before, you can put (almost) any SQL in a trigger. So when you are able to write a SQL update/insert script with as input the three involved table rows you are almost done.
Also build up your problem is small steps / experiments.
It just comes down to read the documentation carefully. I did that for your insert trigger as well, just curious how to do that with HSQLDB.
Is your question answered: edit your initial post add "[Solved]" to the subject and check V
LO4.2.8 for work with ORB; AOO4.1.4,LO5.2.5/6.0.5 on W7E SP1 64bit
It's Microsoft marketing that tells you computers are qualified for non-technicians
User avatar
eremmel
Volunteer
 
Posts: 1026
Joined: Tue Dec 30, 2008 1:15 am
Location: Barneveld, Netherlands

Re: Looking for TRIGGER Sample

Postby Villeroy » Thu Mar 23, 2017 8:01 pm

I would be greatful if you, dreamquartz would publish a simple database with triggers.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26375
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Looking for TRIGGER Sample

Postby dreamquartz » Thu Mar 23, 2017 8:55 pm

eremmel wrote:I assume particular for HSQLDB 2.x...
As I told you before, you can put (almost) any SQL in a trigger. So when you are able to write a SQL update/insert script with as input the three involved table rows you are almost done.
Also build up your problem is small steps / experiments.
It just comes down to read the documentation carefully. I did that for your insert trigger as well, just curious how to do that with HSQLDB.


I am trying to work on examples that could be useful to the community.
That was my plan from the getgo.
I probably did read upon everything I could find concerning TRIGGERS, and even communicated with http://www.hsqldb.org about them.

However other work is keeping me very busy, and this has to sneak in between.
It turns out to be quite a tedious process, and yes by the infamous programming coding method called "Trial and Error", we are building up some better understanding of what can be accomplished.

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 663
Joined: Mon May 30, 2011 4:02 am

Re: Looking for TRIGGER Sample

Postby dreamquartz » Thu Mar 23, 2017 8:57 pm

Villeroy wrote:I would be greatful if you, dreamquartz would publish a simple database with triggers.

See also my response to eremmel.

From the beginning it was my goal to provide the community with examples.
It surprised us that there was/is practically nothing available.

I will get examples out there so that everyone can benefit.

Dream
LO 5.x and OO 4.x on Windows 7 PRO & Ubuntu 16.04 LTS.
dreamquartz
 
Posts: 663
Joined: Mon May 30, 2011 4:02 am


Return to Base

Who is online

Users browsing this forum: No registered users and 3 guests