Questions tagged as 'trigger'

2
answers

Write values whenever a new line is added via trigger

I need help solving a problem, I tried halfway, but it is not working. I have two tables which I have to perform this activity and create a trigger called trg_line_total to write the line_total value in the LINE ta...
asked by 15.07.2016 / 17:21
0
answers

Trigger in MySQL for movie rentals? [closed]

I need a little help because the teacher said that it is not to use FUNCTIONS and PROCEDURES , ONLY TRIGGER . Follow the picture of what he's asking for. I really can not do it. For me it had to exist before a% w_% where it ch...
asked by 30.11.2015 / 18:55
1
answer

"create temp table" in trigger in PostgreSQL

Is it possible to create an insert trigger in a "Table1" using "CREATE TEMP TABLE" in its structure and feed a "Table2"?     
asked by 02.06.2015 / 23:33
2
answers

Create total sales procedure (value) per customer

I need to make a procedure that instantiates the cli_TotalCompras column of the client table with the customer's total (in value). In the vendaProduto table I have the value ( vpr_ValorUnit ), the quantity ( vpr...
asked by 26.10.2016 / 00:22
1
answer

How to create a "trigger" function when a variable changes in value?

Looking at pygame.Surface.get_rect () , I realize that when I change a variable, for example left , pygame recalculates all class variables automatically ( center , right , etc). I'd like to know, how is this done? How c...
asked by 02.10.2018 / 20:57
1
answer

When firing an Update Trigger, one of the fields only refreshes after a second Update

I created a trigger to report the fine on the return delay of rented movies, however, when triggering the trigger once (giving an UPDATE), the "MultaTotal" field does not update (only it). But when the trigger is triggered a second time, the fie...
asked by 09.12.2018 / 16:27
2
answers

censor a word registered in a database

Is there a way to censor and replace a MySQL registered word with a procedure or trigger for example? The word in the case would be Flash House and need to be replaced by Old School .     
asked by 05.09.2017 / 03:52
2
answers

Trigger that updates record in a table

I need to update an X table whenever there are any changes in the Y table. I have found numerous examples of how to save the changed records in the Y table, both when a record of the X table is deleted and when it is changed or inserted, but my...
asked by 11.05.2017 / 20:52
2
answers

Create Trigger to change record only when modifying a field

I have a SQL Server database table, I have a column that shows the status of that database ('A','I','S','C') . I created a field named Update_data , which will receive a datatime every time the client changes the registration stat...
asked by 22.12.2018 / 02:57
1
answer

Error: "Column count does not match value count at row 1" when inserting value in table with trigger

After creating trigger : DELIMITER # CREATE TRIGGER BACKUP_PRODUTO_INS AFTER INSERT ON PRODUTO FOR EACH ROW BEGIN INSERT INTO BACKUP.BKP_PRODUTO VALUES(NULL, NEW.IDPRODUTO, NEW.NOME, NEW.VALOR, 'I'); END # DELIMITER ; DESC of the...
asked by 15.03.2018 / 04:13