Questions tagged as 'trigger'

1
answer

Trigger executes case value of a column is 'Database I'

Create a trigger that automatically enrolls a student in "BD I Laboratory" as soon as it is enrolled in "Database I". use Universidade; insert into Realiza_matricula (RGAacad, Nomedisc) values(20179474911, 'Banco de Dados I'); Delimiter...
asked by 20.11.2018 / 18:37
1
answer

Error executing a Trigger

I'm having the following error when executing my trigger, how could I resolve it? ERROR The error when I insert insert into the product-purchase table to calculate total INSERT into purchase_product (CPR_CODIGO, PRO_CODIGO, CPP_QTDE, CP...
asked by 10.09.2018 / 21:49
0
answers

Error creating TRIGGER MYSQL

Can anyone tell me where I'm wrong on Trigger below? create procedure cons_agen (in prof_mat int) begin select p.nome_prof, c.nome_curso, l.nome_lab, a.inicio, a.fim from agendamento a inner join professor p on a.id_profs=p.matricula_prof inne...
asked by 20.11.2018 / 13:09
1
answer

How can I make a procedure to update the balance in postgres?

Mine has been giving a mistake that I can not understand talking about having a bug in $, but when I used another example procedure from the internet almost in the same way as mine did, then the error is being in how to do it procedure. The o...
asked by 22.11.2018 / 23:13
0
answers

Problem with python in postgres on mac

People, I'm testing trigger functions with python in Postgres and I'm having problems when I test on my Mac. Here's the function: create function sendchange() returns trigger as $$ import requests import json url = "http://localhost:8080/send...
asked by 22.11.2018 / 13:58
1
answer

How to do replace in all but one field?

I have a table with several fields, and I need to make a insert or replace on each line. I get the data coming from a software and if it does not exist, I insert, if not replaced. I get a array that can have all or just a...
asked by 22.11.2018 / 14:56
0
answers

How to create a TRIGGER for an INSERT event without causing a lock on the SQLServer table

Hello, I'm doing the integration between 2 solutions, where I need to detect the change of a table, and based on the information that is sent I should manipulate another table. I do not have access to the 1st solution to make it change itself, b...
asked by 11.10.2018 / 15:05
2
answers

Postgres: How to compare json to create audit trigger and display only the differences

According to the structure below, I would like it when I update it to memorize only the differences. Example in the product table I have the fields prodcode = 1 proddescricao = 'OLEO FILTER' prodestoque = 33 If I do an update changing the sto...
asked by 27.09.2018 / 15:28
1
answer

WPF - Trigger on elements inside a wrap panel

I have a wrap panel that contains several dockpanels, and I need each dockpanel to change its background by hovering the mouse over it. I think creating a trigger for each element would not be appropriate. My sham is like this: <StackPanel&...
asked by 25.09.2018 / 15:23
0
answers

Trigger in sql server management studio

I would like to create a Trigger in MSSMS (Sql Server) which, if I made an INSERT on a table A, with the last record of table B, it inserted 10 more records in table B, and so on every time I used the last one created another 10. But I do not kn...
asked by 25.09.2018 / 20:27