Questions tagged as 'trigger'

1
answer

TRIGGER PostgresSQL, insert and delete

I have 3 tables, one "task" and two other identical tables, with their respective fields of name "imputa_pendientes" and "imputa". The 3 tables have a common field project_id. I want to ensure that when a line is inserted in tasks with id_sec...
asked by 24.07.2018 / 12:29
0
answers

Pass type BLOB in trigger

I have a trigger where based on the current status of a column, I make an insert in another table. Everything seems to work correctly, except the passage of the data of an attribute that is BLOB. This attribute is passed NULL. I have this pro...
asked by 16.07.2018 / 20:22
0
answers

Trigger Apex to create a Prospect Contact with Opportunity Earned

trigger OppLeadtoClient on Opportunity (Before update) { If(trigger.new[0].StageName=='Closed Won'){ Lead ld = [SELECT Id FROM Lead WHERE accountid__c =: trigger.new[0].Accountid ]; Database.LeadConvert lc = ne...
asked by 10.07.2018 / 23:22
0
answers

Error in PostgreSQL trigger - UPDATE

I have a question for you. I am developing a database in which I have a table called "currencies", which has a field called dvs_local (boolean) which indicates which is the local currency of the system (only one of the table - TRUE, the rest mus...
asked by 04.07.2018 / 01:47
1
answer

Trigger does not run

I am using the express framework to learn how to create a simple resample with node and mysql and I have the following code: router.post('/CrearUsuario',function(req,res,next){ postData = Array() postData.push(req.body.primerNombre);...
asked by 26.07.2018 / 23:36
0
answers

Trigger in MYSQL (Insert)

I'm trying to create a trigger in MYSQL. I was reading the documentation of MYSQL, some examples that I saw out there on the internet and, at the moment of truth (adding it to the console) marks me a syntax error. I do not know what it can be, a...
asked by 11.06.2018 / 01:25
1
answer

JS Pass a trigger to the value of a variable at the instant it is created

For example: var items = jq(".li"); for(var i=0; i<items.length; i++){ var item = jq(items[i]); item.click(function(i){ console.log("i: ", i); }); } The problem with this code is that when the click event is triggered...
asked by 23.05.2018 / 16:43
0
answers

Trigger between three tables

On the one hand, article table (code_of_bars, price_article), ticket (ticket_id, total_price) and finally the table that relates them formed (id_ticket, code_of_bars). I want that every time an entry is added in formed the price of the ticket is...
asked by 19.05.2018 / 11:24
0
answers

Make one column depend on another

I need that when inserting a row, one data is updated in function of another. In this case I intend that number2 be updated to be the same as number1, but the trigger does not work CREATE FUNCTION igual() RETURNS trigger AS ' BEGIN new.numer...
asked by 18.05.2018 / 19:49
0
answers

Trigger error SQL 1242 (Reserved words NEW & OLD)

Next I am going to attach an image about the database on which I am working to perform the trigger and I begin to tell you Well, the idea was to create a trigger that, when I put all the data in an order, gave me the subtotal, with the fol...
asked by 03.05.2018 / 12:51