All Questions
3,037
questions
0
votes
1
answer
26
views
Oracle looses float precision when using a trigger
I use a trigger to fill a SDO_POINT_TYPE, or SDO_GEOMETRY column from two other columns of the same table.
For some reason, the trigger changes the floating values precision when compared with direct ...
0
votes
2
answers
28
views
Triggers on parent and child table and order of execution respectively
lets say I have table A and table B. Table B is the child table and has a foreign key to table A. I have other mirrored tables, lets say table C(mirror for table A) and table D(mirror for B). Both ...
0
votes
2
answers
57
views
Oracle: How to define a trigger that inserts one more row into the same table after each insert?
Say I have a m to n table like this, which makes entries from a table tab reference other entries in the same table:
CREATE TABLE m_to_n (
ID_1 NUMBER(9,0),
ID_2 NUMBER(9,0),
PRIMARY KEY (ID_1, ...
0
votes
2
answers
54
views
Mutating table error on after statement trigger. Why?
Imagine the following scenario in Oracle 19:
Table A
Table B
Table B has a compound trigger TB_TRG that reads Table A (procedure fired after statement).
Table A has a trigger that updates Table B (and ...
0
votes
1
answer
31
views
Trigger to continuously get last 15 mins of data in Oracle Sql
I have a table called SALES_ORDER.Data gets refreshed and new data keeps coming in in this table. I want to write a trigger to fetch last 15 minutes of data from this table and insert it into another ...
0
votes
2
answers
55
views
Trigger causes an error because it is mutating the table
I'm writing a trigger that is supposed to add an ID of a user that has multiple bank accounts to another table once the sum of all balances he has goes over 10000 dollars. the accounts can be in ...
0
votes
1
answer
26
views
Oracle - Updating a Column When Changes Occur Across Multiple Tables
I have a scenario in my Oracle database where I have a main table A and several related tables B, C, and possibly more, joined together through complex queries. Table A has an 'update_date' column ...
0
votes
1
answer
89
views
Before insert trigger (PL/SQL) does not fire in Oracle SQL Developer
I have a simple trigger defined for the Jobs table in HR sample database from Oracle. I am testing it inside Oracle SQL Developer.
set serveroutput on;
create or replace trigger insertjob
before ...
0
votes
1
answer
25
views
Oracle Apex trigger issue
Error at line 3: PLS-00103: Encountered the symbol "" when expecting one of the following: . ( * @ % & = - + ; < / > at in is mod remainder not rem <an exponent (**)> <>...
1
vote
0
answers
57
views
ORA-4061 but no changes
Oracle 19c (19.20.0.0.0) on HP-UX
We have a table which has a COMPOUND trigger as follows (I am typing this as I cannot copy/paste from work, so forgive any typos):
CREATE OR REPLACE TRIGGER ...
0
votes
1
answer
34
views
Cannot properly write a trigger
I've created a view from a table named Carti and updated some of its contents, and in doing so automatically updating the original contents of the table Carti. To prevent this from happening I tried ...
-1
votes
2
answers
53
views
unable to insert entries into another table, using after insert
CREATE OR REPLACE TRIGGER trg_addRentalCollection
AFTER INSERT ON contracts
FOR EACH ROW
DECLARE
v_monthly_payment_date Date := :NEW.contractStartDate;
v_partial_payment NUMBER(9,2);
...
0
votes
1
answer
33
views
oracle row level trigger collides with other triggers
I have a row-level trigger to update another table if a value changes. But on the table there are also many other triggers and an execution order cannot not be provided. So might be a compound trigger ...
0
votes
1
answer
69
views
pl/sql. after each statement does not a variable defined before the before statement clause when writing a compound trigger
I have a table Uspev on schema MARSEL, which contains columns student(a student's ID), predmet(a subject's ID), ocenka(a mark) and data(an exam date). I need to write a compound trigger that prohibits ...
0
votes
2
answers
59
views
Oracle Trigger: Unable to Update Table Using Subquery or Variables
I am encountering an issue with an Oracle trigger where I am attempting to update a table based on a subquery result or a declared variable. The trigger is designed to execute before an update on the '...