Questions tagged [database-trigger]

A database trigger is procedural code written in the current database DML, that is automatically executed in response to certain events on a particular table or view in a database. The trigger is mostly used for maintaining the integrity of the information on the database.

A database trigger is procedural code written in the current database , that is automatically executed in response to certain events on a particular table or view in a database. The trigger is mostly used for maintaining the integrity of the information on the database.

1659 questions
0
votes
1 answer

SQLite trigger Update Of same row without knowing id?

How can I get something like this to work in SQLite? I want it to only apply to the row that got updated, given that many other rows may share the same first name. CREATE TRIGGER update_directory_fName UPDATE OF fName ON directory BEGIN …
Eric
  • 476
  • 2
  • 8
  • 20
0
votes
1 answer

Too many concurrently fired triggers (increase MaxNoOfFiredTriggers) from NDBCLUSTER

I'm making batch operations with MySQL Cluster NDB: insertion of 10000 or 5000 rows and removal in a single transaction. Insert works fine, but removal fails with an exception: java.sql.SQLException: Got temporary error 221 'Too many concurrently…
divanov
  • 6,173
  • 3
  • 32
  • 51
0
votes
1 answer

Is it possible to implement trigger that run on update in other schema

I have two database users on the same server like test_user, test_customer. My requirement is to create a trigger in test_user that will execute on insertion in any table in both the user test_user, test_customer like cust_id in Test_customer as…
Noman Akhtar
  • 690
  • 1
  • 12
  • 17
0
votes
1 answer

Performance issues with UPDATE in AFTER UPDATE Trigger

I have a small performance issue with one of my database triggers in my MS-SQL Server 2014 database. CREATE TRIGGER [dbo].[TRG_T_TPM_Vehicle_Update] ON [dbo].[T_TPM_Vehicle] AFTER UPDATE AS BEGIN -- SET NOCOUNT ON added to prevent extra result…
Thomas Voß
  • 1,145
  • 8
  • 20
0
votes
2 answers

Oracle : "parsing failed" error when creating an auto_increment trigger

I'm trying to make an auto_increment trigger for the IDs of an Oracle database. After some research, I found a way to write one using a sequence and a before insert trigger. Problem is, when I execute the trigger, I have the following error…
0
votes
1 answer

Log record changes in Filemaker like triggers works in SQL

I'm trying to create the following scenario in Filemaker: I basically would like to track changes of a value in a table, when used in a layout. To make it simple, I have a table with two columns, Table 1 with an ID (Primary Key) in the first column…
Asken
  • 3
  • 3
0
votes
2 answers

Updating the status after 30 min automatically by using database calls

Updating the status after 30 min automatically by using database calls I have Master table with two coloumns (ID , Active) values like (val1 , 0(Active)) (1 not active) Another table Transaction with three fields (ID , Locked Time , Unlocked Time)…
0
votes
0 answers

How to get value inside trigger

i'm running my application using one DB but during some specific table insertion i'm calling trigger where i need to get some value from some another DB.Previously i did this by hard coding the specific DB name inside the trigger. i got it correctly…
0
votes
1 answer

Oracle_Trigger: Auto Update Of a Column Based Upon INSERT/UPDATE

This might appear a simple query for most of you, but I am a beginner in Oracle DB. A table has been created with below script- CREATE TABLE PLAN_TABLE ( PL_ID DECIMAL(10,0) PRIMARY KEY NOT NULL ,PL_NAME VARCHAR2(300) DEFAULT NULL …
Anshu
  • 51
  • 1
  • 8
0
votes
1 answer

MySQL Trigger : query inside query error for variable quotation

I have created a trigger : DELIMITER $$ CREATE TRIGGER member_enrollment_update AFTER UPDATE ON memberships FOR EACH ROW BEGIN INSERT INTO query_logs (QUERY,shop_id) VALUES ("update memberships set…
Shahrin
  • 134
  • 1
  • 2
  • 11
0
votes
1 answer

PgAdmin III, Windows - can't see database trigger functions when creating an event trigger

I have a database that looks like this: As you can see, I have defined a trigger function Balance_check. I would like to now create an event trigger which calls that functon. However, when using Pgadmin's event trigger creation wizard, my trigger…
user129186
  • 1,156
  • 2
  • 14
  • 30
0
votes
0 answers

Create Trigger with select of non existence

I'm looking forward to create a trigger on sql oracle and my goal is to check if there is no other room being occupied at the same time by another "class" in the same table. So, I thought I could create something like this: create trigger…
user6357979
0
votes
0 answers

Need just one trigger on Hierarchical Data table update on sql server instead of trigger on row update. Is ther any way to do?

I have Hierarchical Data table and I need to maintain a replica of it in other DB for the people with less access rights to use. Now this Hierarchical Data table is using Sql server heirarchyid and function to get the tree, sub tree. Any movement in…
0
votes
1 answer

Using triggers to maintain data integrity from similar tables in two databases

I have two SQL Server databases. One is being used as the back-end for a Ruby-On-Rails system that we are transitioning from but is still in use because of the Ruby apps we are rewriting in ASP.NET MVC. The databases have similar tables, but not…
Timothy Dooling
  • 470
  • 1
  • 4
  • 17
0
votes
2 answers

Trigger did not execute

I wrote a simple trigger: CREATE TRIGGER test_tr ON bi_test_tr AFTER INSERT, UPDATE, DELETE AS BEGIN INSERT INTO test (datechange, sum1, sum2, sum3) SELECT GETDATE(), SUM([filed1]), SUM([filed2]), SUM([filed3]) …
4est
  • 3,010
  • 6
  • 41
  • 63
1 2 3
99
100