Questions tagged as 'trigger'

0
answers

Create Trigger to update table of BANK 2 when changing table of BANK 1

I have several databases BANK_1 (Main) BANK_2, _3, _4 ... (Companies). In every bank there is a company table, who have the same structure, in BANK_1 I have the company register of all BANK_2, _3, _4 ...! I would like to update any company infor...
asked by 07.09.2018 / 17:57
1
answer

Problem with Trigger After Update with Internal Update in Mysql

I'm creating a trigger in mysql, the trigger is created but when I go to update the flag to test mysql it returns me this error ERROR 1442 (HY000): Can't update table 'aux_Batelada' in stored function/trigger because it is already used by st...
asked by 25.07.2018 / 22:48
1
answer

Trigger and another field

In postgres I have two tables, test1 (id_test1, name) and test2 (id_test2, test1_id_test1, phone) In the PHP form I have the field name and phone number. When I write name in test1, a trigger replicates the primary key in test2 (test1_id_test...
asked by 06.07.2018 / 17:22
0
answers

Difficulties in trigger creation in MYSQL

You are giving the error # 1064, I do not know what I do, please help me ... CREATE TRIGGER comissao ON tb_Pedido FOR INSERT, UPDATE, DELETE AS BEGIN DECLARE v_codFuncionario INT DEFAULT NULL; DECLARE v_...
asked by 06.06.2018 / 01:15
1
answer

Error creating Trigger with more than one table

I'm having trouble creating a Trigger that modifies more than one table. DROP TRIGGER IF EXISTS vendedor_pago; DELIMITER $$ CREATE TRIGGER vendedor_pago AFTER UPDATE ON parcelas FOR EACH ROW BEGIN UPDATE vendas, comissao, parcelas...
asked by 05.06.2018 / 22:45
0
answers

Error executing MySQL trigger - RESULT SQLSTATE

I made a trigger in mysql to save a query to a table that is executed whenever there is an update or it in the provider table. On my computer, localhost with xampp, it works normal, that is, every time I update or delete a record in the table...
asked by 24.05.2018 / 05:01
0
answers

Post_Event in MySQL

Good night, in firebird we have the functionality to create a trigger with the post_event function, in mysql do we have this function? because I have a delphi application that uses mysql and I have a need that using the FiredacFederal from Fir...
asked by 27.05.2018 / 01:24
0
answers

Trigger creates duplicate records

The "update" trigger in Mysql creates 8 records with each update. The first record is the old record, the next 7 are copies of the change. How do I leave only the old and the edited? I tried to put a UNIQUE key in the datetime of the "histo...
asked by 23.05.2018 / 09:00
0
answers

How to create triggers in DB using XAMPP?

A group has N events and each event has M expenses. 1) The trigger below should update the last modification made to the group when an INSERT is done in the event table. Why does not it work? CREATE TRIGGER trg_eventos AFTER INSERT ON e...
asked by 25.04.2018 / 22:02
0
answers

Cursor with PostgreSQL

I have here a process table that activates a trigger when a new process is written. In my case, when someone generates a process for a request that was returned the system must "return" the quantity of items that were requested in that request...
asked by 02.04.2018 / 22:55