The trigger tag has no wiki summary.
2
votes
2answers
26 views
Trigger for updating a count of rows from a table into another table
I have these two tables:
mysql> select * from orders;
+-------------+---------+
| Customer_ID | Item |
+-------------+---------+
| A01 | CPU |
| A01 | Monitor |
| A02 ...
0
votes
1answer
32 views
Error in trigger: table is mutating
CREATE OR REPLACE TRIGGER "TRANSACTION"
before
update of totalunitsbought on SIPHOLDER referencing new AS NEW old AS OLD
for each row
begin
declare
mportfolioname varchar2(20);
...
0
votes
1answer
72 views
Synchronise data from one table to another & vice-versa using triggers
We are migrating from one database structure to another - very slowly. The system is MySQL. There are two databases. For example's sake, we will call the databases old_db and new_db. Both databases ...
0
votes
1answer
26 views
Foreign key with multiple references
I have the following three tables in mysql database named "THE_COLLEGE"
mysql> desc students;
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | ...
0
votes
1answer
76 views
find and insert row to another table using mysql trigger
I have the following three tables in mysql database named My_Company
mysql> desc employee;
+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | ...
-1
votes
1answer
61 views
Passing argument in trigger dynamically
CREATE TRIGGER audit_proc_tr
AFTER INSERT OR UPDATE OR DELETE
ON "log".hi
FOR EACH ROW
EXECUTE PROCEDURE "log".audit_proc(argument);
CREATE OR REPLACE FUNCTION ...
2
votes
2answers
78 views
DB2 UPDATE TRIGGER
I am trying to create a trigger in a DB2 database that runs on the update of a column in one table, and then fills in another table with certain values.
For example, there is a power unit table with ...
0
votes
1answer
72 views
What is the error in this TRIGGER?
The MySQL version I'm using is 5.1.46.
The query is
CREATE DEFINER = CURRENT_USER TRIGGER `movimentacao_before_del_tr` BEFORE DELETE ON `movimentacao`
FOR EACH ROW
IF (OLD.stMov IN ("E", "C", ...
1
vote
1answer
48 views
INSERT trigger dying with with #target columns not equal to #expressions, but they are equal
I am trying to write my first trigger. It is an insert trigger as follows:
<b>Fatal error</b>: postgres7 error: [-1: ERROR: INSERT has more target columns than expressions at character ...
5
votes
1answer
152 views
Getting Identity values to use as FK in an INSTEAD OF trigger
I have a series of updateable views we are exposing to end users as the interface for a back end process.
One of these views references two tables and requires an INSTEAD OF trigger for UPDATE and ...