Questions tagged as 'trigger'

1
answer

List tables that have trigger

Is there any way to know which tables have at least 1 trigger? For example, I have a system with 10,000 tables, and I would like to know which one has a trigger.     
asked by 23.04.2018 / 20:10
1
answer

How to trigger a trigger with jquery?

I'm working with a radio button and I can not trigger a trigger. Can anyone help me solve it? $("input[name='estimate_method']").on('change', function() { $(this).prop("checked", true); $("input[name='do']").trigger("click"); });...
asked by 26.09.2016 / 22:33
3
answers

Trigger to update date modified date in firebird

I have a client table with the Registry Data Date and Registry Modification Date fields would anyone know how to create a trigger that updates the Modified Date column of this customer table every time a row is changed, so far I've...
asked by 02.09.2016 / 14:22
1
answer

Trigger for a Select

I would like to know if it is possible to execute a Trigger when a SELECT is performed in a certain table, for example: CREATE TABLE IF NOT EXISTS "Conversa" ( "idConversa" SERIAL NOT NULL, "idEmissorConversa" INT NOT NULL, "idReceptorCo...
asked by 11.10.2014 / 15:59
1
answer

Create a trigger to trigger whenever a field is edited mysql

Good colleagues, I have a problem that I still can not solve. I want to create a trigger that whenever the column of quantity of product undergoes a update it triggers an action for another table, to allow the user to know that a certain product...
asked by 31.07.2018 / 12:12
1
answer

Trigger gives error with date

I did a trigger to count the weekdays. It accepts the dates of month 06 very well, but other dates gives the following error: INSERT INTO 'teste' VALUES ("2018-05-01") #1292 - Incorrect date value: '20180532' for column 'i' at row 1 Trigger...
asked by 29.06.2018 / 22:32
1
answer

I am trying to create a Trigger in MySql but it is giving syntax error

CREATE TRIGGER comissao ON tb_Pedido FOR INSERT, UPDATE, DELETE AS BEGIN DECLARE v_codFuncionario INT DEFAULT NULL; DECLARE v_dataPedido DATETIME(3) DEFAULT NULL; DECLARE v_valorComissao DECIMAL(15,4) DEFAULT NULL IF(SELECT COUNT(*) FROM INSERTE...
asked by 12.06.2018 / 20:39
1
answer

Get table name with Trigger / Function in Postgres

I am implementing a simple replication form of two tables or more. I have the replication table that has the name of the table to be replicated and id. To feed the replication table I have a trigger on each table that will be replicated b...
asked by 11.01.2018 / 18:27
2
answers

Trigger to link multiple records

I have 3 tables: Usuarios (id, nome) Desafios (id, descricao) Usuarios_tem_desafios (id_usuario, id_desafio, status) The goal is to add a new user by filling in the Usuarios_tem_desafios table with the link between the added user an...
asked by 16.01.2018 / 13:02
1
answer

Create a procedure in PostGreSql

I have created a database in PostGreSql of Equipment Allocation where one or many Equipment can be Allocated by one or many Sectors. That is, I have 3 tables in this relation: One is the Table Sector with columns (CODE AND NAME): CREATE TABLE...
asked by 04.09.2017 / 21:01