Questions tagged as 'trigger'

0
answers

How can I combine old / new with a variable in postgres?

I'm doing as a type of blog, and I'm trying to save the record id the table that triggers my function. There are two tables, customers and orders, I want that if customers shoot my function, I saved the customerid that was inserted, modified or...
asked by 16.04.2018 / 08:38
1
answer

How to create a trigger that updates the fields of one table with another?

This is my first question here, well to the point, for the class of Databases II I need to create a trigger in MySQL that when inserting data in the student table the table of student support is also updated, I know it can be a Maybe it's very X...
asked by 14.04.2018 / 20:28
1
answer

update Trigger - Mysql

I have to create a trigger associated with the orders table so that when I update a record in the orders table, I update it in the table detailing requests, I have tried it in the following way but there is no way, if someone could solve it. ......
asked by 14.01.2018 / 12:21
1
answer

Trigger with compilation errors

Well it turns out that I want to make a trigger that when I update a column in a specific table records are annexed ie I have a table where articles when the sale is made and the quantity is discounted that information is given to a sales table....
asked by 17.12.2017 / 21:36
1
answer

Messages in MySQL

In PostgresSQL I could raise exceptions from a triguer with the Raise Exception, so I ask how can I display a message from a trigger as it did in postgres with the Raise Exception in MySQL?     
asked by 02.10.2017 / 00:06
1
answer

Trigger is not recognizing me the values sent by NEW

The fact is that I am making a trigger to act as a mirror in another table, however it is not working as it should. Here I leave the trigger: CREATE TRIGGER new_loaner_added AFTER INSERT ON 'total_loaner' for each row begin INSERT INTO Nu...
asked by 12.09.2017 / 17:11
3
answers

Trigger Oracle with sysdate

I have a trigger in a simple database, what I want that trigger to do is generate an id with characters and numbers, but it does not work. I hope you can help me, I thank you very much.     
asked by 26.09.2017 / 03:11
0
answers

Avoid modifying tables with a trigger

I have a database where I am adding cards ... it would be something like this tarjetas identificador fecha_expedicion fecha_vencimiento estado saldo_actual where state is Boolean that accepts 0s and 1s ... that is to say 0 inactive and 1 ac...
asked by 03.08.2017 / 14:36
0
answers

Using floor in a trigger

Good day sorry I have this trigger to insert a getdate in the register whose code is FLOOR (m.codigoM) but I do not do the operation I'm thinking that the best is very ambiguous conditions that I'm putting. CREATE TRIGGER fechaactual ON c...
asked by 07.07.2017 / 19:49
1
answer

Error creating a trigger with MySql

Good, I am trying to make a trigger with MySql, the problem is that I have always worked with Sql-Server and now I am having some complications. From the following code what is wrong with me? : USE 'test_db'; DELIMITER $$ CREATE TRIGGER 'tr_i...
asked by 15.06.2017 / 15:28