ensuring a line was inserted, updated or deleted
What is the best way to ensure an executed Coldfusion query?
For updates and deletions, I'm beginning to do is use cfquery result and make sure result name dot recordcount is 1.
For the pads, I check to see if the result name dot identitycol is there.
Good ways to make sure are queries ran?
We add that we can also use the cftry and cfcatch tags to manage the error if something abnormal happens to execution. If we experience any interdependent statements like insert that update and if the update has failed, we should roll back the insertion, then we can go to the cftransaction tag.
Tags: ColdFusion
Similar Questions
-
approximate number of inserts, updates and deletions
Hello
in 10 g with STATISTICS_LEVEL = TYPICAL
How to see the approximate number of inserts, updates, and deletes for a specific table?
Thank you.This table has been abandoned - but segment still exists – and 'strange' name comes from the management of the recyclebin.
Nicolas.
-
trigger check the previous record of line before insert/update
Hi all
I would like to create a trigger that a customer will not be able to create a new account, if it has a status of "Non-payment".
CustomerID custNRIC paymentStatus
----------------------------------------------------------------
Non-payment of 200 F7654323A
It will reject the following statement.
insert into customer (custID, custNRIC, paymentStatus) VALUES (201, 'F7654323A', 'Good');
so, how can I go around to solve this issue?
sqlnoob wrote:
Hi all
I would like to create a trigger that a customer won't be able to create a new account, if it has a "Non-payment" statusYou
You can't do things like that in a trigger.
It will reject the following statement.
insert into customer (custID, custNRIC, paymentStatus) VALUES (201, 'F7654323A', 'Good');
The trigger would dismiss as EVERY other row in the same transaction, if you try to use a trigger.
You can't stop a trigger to run except by raising an exception and the trigger stop from doing anything for ANY line that the trigger activated on.
together to define
CREATE OR REPLACE TRIGGER reject_new_account
AFTER INSERT OR update ON the client
FOR EACH LINE
DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
totover NUMBER (3);
BEGIN
SELECT COUNT (*)
IN totover
OF THE customer
WHERE: NEW.nric = customer.nric
AND: NEW.badstatus = "Non-payment";
Why are you tring to use an autonomous transaction? All that makes the transaction will NOT be part of the transaction that fired the trigger.
I know there is a problem with the line 13 ' AND: NEW.badstatus = "Non-payment".»
so, how can I go around to solve this issue?
This is the LEAST of your problems. Do NOT try to nontransactional things in a trigger.
Also, don't try to query the table that the trigger is activated on.
This is the fundamental question: Oracle is a multi-user system. Other users may be perform DML on the same table at the same time. So any NUMBER that provides this trigger can turn out to be inaccurate when other users post their transactions.
The best you can do in a trigger is throw an exception. If you do this will affect the complete relaxation and all the lines he treated - not only one line you see that you want to reject.
A requirement like yours needs to be satisfied by the presence of DML performed using functions or procedures and serialize the customer INSERT/update this transaction that a SINGLE session/user/can perform DML on the table for a client given.
-
Insert, update, or delete: those who are more expensive?
Hey guys,.
In regard to the success of the CPU, those who are more expensive and requires more resources?
Allows says that I have a table that has a char (30) column, which has 3.7 million lines.
Which of them are the most expensive. I was doing a test charge earlier, using tkprof
For CPU hits.
I bet whatever you name, case can be produced which illustrate one of the other two is more expensive?
-
How to keep the (update or delete, insert) triggering action in the table?
Hello experts,
I have create a trigger on update, delete or insert. I insert records into a table which records insert, update, or delete.
I would also like to insert the revival of whick action the trigger as update, delete or insert.
Here's my trigger code.
create or replace trigger BOM_HISTORY_TRIGGER
after update or delete or insert on BOM_HISTORY
for each line
Start
insert into bom_history (BOM_MOD_CODE, BOM_ASSY_CODE, BOM_ASSY_QPS_old, BOM_ASSY_QPS, PPC_SRL_ #, ITEM_ENTR_BY,)
ITEM_MOD_BY, MOD_DATE, ACTION)
values(:Old.) BOM_DIV_CODE,: old. BOM_MOD_CODE,: old. BOM_ASSY_CODE,
: old. BOM_ASSY_QPS,: new. BOM_ASSY_QPS,: old. PPC_SRL_ #,: old. ITEM_ENTR_BY,
: old. ITEM_MOD_BY, SYSDATE, 'delete')
END;
HOW to keep the action in the table.
also, there is error:
WARNING: Trigger created with compilation errors.
Please help to fix it.
Thank you best regards n
Yoann>
insert into bom_history (BOM_MOD_CODE, BOM_ASSY_CODE, BOM_ASSY_QPS_old, BOM_ASSY_QPS, PPC_SRL_ #, ITEM_ENTR_BY,)
ITEM_MOD_BY, MOD_DATE, ACTION)
values(:Old.) BOM_DIV_CODE,: old. BOM_MOD_CODE,: old. BOM_ASSY_CODE,
: old. BOM_ASSY_QPS,: new. BOM_ASSY_QPS,: old. PPC_SRL_ #,: old. ITEM_ENTR_BY,
: old. ITEM_MOD_BY, SYSDATE, 'delete')
>
Unless I've counted wrong you have 9 mentioned columns but try insert 10 items. -
Insert, Update, Delete on a partition table not even at a time
Hello
I have a non-partitioned table on which inserts, updates and deletes come at the same time due to which I am facing problem of contention.
What would be the ideal solutions to solve my problem (deletion conflict.)
Thank you
BadinCan you give us more details on the "problem of contention"? This could mean a very large number of different things.
You have different sessions simultaneously update the same row in the table, for example? If so, you probably need to look at the architecture of the application to avoid multiple sessions to the same line at the same time setting, or you would need to look at the data model to avoid multiple sessions to update the same line at the same time setting.
But there could be dozens of other kinds of claim that you could talk.
Justin
-
With the help of Merge for Update, Insert, Update and also to delete outdated records
Hi all!!!
Suppose that a credit memo the following table called Orders:
In addition, there are a procedure that will generate data on a global temporary table, called Orders_Temp. This temporary table will be used to update the Orders table. + commands + have a trigger that will perform different operations when an Insert, Update, or Delete command is executed.ORDERID STATUS PRICE ---------- ---------- ---------- 1 0 100 2 0 200 3 0 300 4 0 350 5 0 390
Consider the table of Orders_Temp to have the following data after you run a procedure that is responsible for the update of order data:
As you can see, orders 1 and 2 have been updated. Order 3 and 5 were intact, order 4 has been deleted and command 6 inserted. Fusion will take care of properly manage orders 1, 2, 3, 5 and 6, although producing an update of order 3 and 5, which have not changed.ORDERID STATUS PRICE ---------- ---------- ---------- 1 1 100 2 2 200 3 0 300 5 0 390 6 0 350
So, here are the questions:
(1) how could remove the 4 arrestedorder, as this order was not present on Orders_Temp? Is it possible to use the merge command to do this?
(2) is it possible to generates not a update operation for orders of 3 and 5, which have not changed?
I m using Oracle 10.2 SE.
Thank you very much!
RegisHello
Please try this. Not tested! with 9i. I think you can do this by using the union all.
MERGE INTO orders tgt USING (SELECT A.*, 1 mask FROM orders_temp A UNION ALL SELECT A.*, 0 FROM orders A WHERE NOT EXISTS (SELECT 1 FROM orders_temp b WHERE A.order_id = b.order_id)) src ON (tgt.order_id = src.order_id) WHEN MATCHED THEN UPDATE SET tgt.status = src.status, tgt.price = src.price WHERE src.mask = 1 AND tgt.status != src.status AND tgt.price != src.price DELETE WHERE src.mask = 0 WHEN NOT MATCHED THEN INSERT VALUES (src.order_id, src.status, src.price)
or you could try to use a full outer join and treat NULL values.
G.Edited by: g. March 8, 2011 11:17
changed to the Union all the
-
using postings in insert/update/delete
Hello all;
I'm so confused right now... I have read several articles on this subject and I don't know who is good or bad
If an update statement is written in a client front-end as asp.net, must hire us or not, or should leave us it to auto-commit
This scenario applies with an insert as wellIf you ask from the point of view of determining what is best practice
Autocommit is evil and should be avoided at all costs. Unless you really, really, really understand what you do, a request that autocommits will end up with data in an inconsistent state. Unless the developers are extremely cautious, a page that allows you to transfer money from one account to another, for example, eventually sending statements to withdraw money from an account and drop it into the other and autocommit will cause to commit inadvertently withdrawal when filing statement fails.
If you ask from the point of view of what are the technical requirements
If you are in the mode autocommit, it is useless to engage in explicitly all the instructions (of course, you also won't be able to restore all the instructions explicitly)
If you disable auto-commit mode, you will have to validate each transaction explicitly. After all never transactionally consistent of the DML statements (INSERT, UPDATE, and DELETE), you will need to do a commit explicit or an explicit rollback. In the example of transfer of account, you would hire after that withdrawal and the filing of declarations had been executed successfully. When you close a connection, your frame can do an implicit validation or cancellation (it depends on the frame) but who should not be trusted.Justin
-
Database insert/update by PLSQL having problems
I have a piece of code that applies metadata for a set of file IDs. There are several metadata elements and multiple files (in general). So, basically, it's a loop to apply all the metadata is entered in a single file and then a loop to do the same to all the other files.
The changes stem from a table of application that will contain information that is entered before you send the page by the user.
The ID of the file comes from a colon delimited string, using a distribution function. If the string has been implemented 2456:8476:4939 str (2) would be 8476 and str (3) would be 4939. Function PLSQL itself has no significant errors, such as when compiling it works out, but when running it (in this case I as a process of page in the APEX) nothing happens, and when run outside of the application, he says one line was inserted each time, and nothing is inserted/updated in the database.
I looked online and saw people have had similar problems, so I think it might be something simple that I'm just not.
Here is the code:
Published by: MichaelPaul on April 10, 2012 05:57declare updatecheck VARCHAR2(2000); --This will be used to check if an update or an insert is needed str string_fnc.t_array; --Array for the file IDs v_apex VARCHAR(2000); countloop NUMBER; begin str := string_fnc.split(:P53_FILE_ID_LIST,':'); --Splits the file ID string into an array. SELECT COUNT(METADATA_ID) INTO countloop FROM DD_METADATA_MASTER; --Determines how many pieces of metadata are currently possible to have for i in 1 .. str.count loop --For each file in the array, loop. for j in 1..countloop loop --For each piece of metadata that can be altered, loop. begin --If the current metadata item did not have new data entered, do not do anything for it. v_apex := APEX_APPLICATION.G_F01(j); exception when NO_DATA_FOUND then v_apex := null; end; --If it did have something entered, figure out if update is needed or not. if v_apex IS NOT NULL then begin --APEX_APPLICATION.G_F02(j) contains the ID of the metadata item. It is used to determine the type of metadata that is being used. --METADATA_VALUE_ID is simply a unique key whereas the master ID identifies which type of metadata the row is. select METADATA_VALUE_ID into updatecheck from DD_METADATA_VALUES where FILE_ID = str(i) and METADATA_MASTER_ID = APEX_APPLICATION.G_F02(j); exception when NO_DATA_FOUND then updatecheck := null; end; --If there is currently nothing in the values table for the current metadata item for the current file, new data should be inserted. if updatecheck IS NULL then INSERT INTO DD_METADATA_VALUES (METADATA_MASTER_ID,METADATA_VALUE_ID,VALUE,FILE_ID) VALUES (APEX_APPLICATION.G_F02(j),DD_METADATA_VALUES_SEQ.NEXTVAL,v_apex,str(i)); --If there already is metadata for the current item in the current file, update that data. else EXECUTE IMMEDIATE 'UPDATE DD_METADATA_VALUES SET VALUE = :1 WHERE FILE_ID = :2 and METADATA_MASTER_ID = :3' using v_apex,str(i),APEX_APPLICATION.G_F02(j); end if; end if; end loop; end loop; end;
MichaelPaul wrote:
I tried a POSTING earlier, but let me test it in several places, rather than the only point that I had earlier to make sure that is not the issue.I tried with both, directly after insertion, and directly after the "EXECUTE IMMEDIATE"...
Had similar problems, and that worked for me...
HtH
Johan -
Hi all
I have a requirement in oracle forms 6i
I have a block of data that is in a table
There are 5 columns
1 column is only display and 4 others are normal text fields where we can insert update and delete these records
My requirement is when a user updates a record that should trigger an alert and the alert should ask if the user wants to update that particular record
The user presses Yes, then the record should be updated if the record should show as it has been shown previously
Similarly in case of delete an alert should fire where we have to ask confirmation if the user presses Yes, then the record must be deleted from the database
otherwise the registration should be visible on the form again as we
my 3rd requirement which is also
I have an element field which is the normal text and only display field is the description
When you enter a new record when I enter in the item field and press tab or navigate outside the scope of the element, then the description of the element must be pouplated in the decsription read only field
Please help me in the above 3 cases
I'm new to forms
I use an ID of friends that has a lot of messages
Thanks in advance1)
your first requirement I'd prior block UPDATE trigger:DECLARE v_alert_button NUMBER; BEGIN v_alert_button := SHOW_ALERT('your_alert'); -- "Do you want to update?" IF v_alert_button = ALERT_BUTTON1 -- assuming "No" THEN -- reset value: :YOUR_BLOCK.YOUR_ITEM1 := GET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM1', DATABASE_VALUE); -- optionally set item to valid if you don't want validations to fire: SET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM1', ITEM_IS_VALID, PROPERTY_TRUE); -- do this for every item: :YOUR_BLOCK.YOUR_ITEM2 := GET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM2', DATABASE_VALUE); ... ... -- finally reset record status: SET_RECORD_STATUS(:SYSTEM.CURSOR_RECORD, STATUS, QUERY_STATUS); -- interrupt PRE-UPATE trigger: RAISE FORM_TRIGGER_FAILURE; END IF; END;
(not tested, please try for yourself)
2)
trigger the alert first remove the trigger.3)
You can do within the WHEN-VALIDATE-ITEM trigger or a list-of-value (LOV) that returns the values of description. -
How to find the insertion, update the schema
Hello
I want to follow insert, update, or delete to onparticular the database schema.
your early repsone is appreciated.
Thanks in advance.user647572 wrote:
Thank you for your kind reply... It is very useful to me...Sorry, but I use under request and
EXTENDED_TIMESTAMP as a timestamp, type of zone data...
SELECT SQL_TEXT
Of
DBA_COMMON_AUDIT_TRAIL
where EXTENDED_TIMESTAMP between to_date ('20101016 10:30 ', 'HH24 YYYYMMDD')
and to_date ('20101016 11:00 ', 'HH24 YYYYMMDD')
AND OBJECT_SCHEMA = 'JISPBILCORBILLINGPRD501. '
AND UPPER (SQL_TEXT) AS UPPER ('INSERT%')It takes more time to display the result.
This is a normal situation. See the table in the sys.aud$, what folder contains this table?
You can delete old audit as recordsDELETE FROM sys.aud$ WHERE timestamp# < SYSDATE -40;
>
Please give me suggestion on this subject...
-
Mr President
Jdev worm is 12.2.1
How to modify and update a line later was inserted and updated in the doDML() method?
I added two rows in my table a method of action-listener in bean managed and secondly with operation doDML() as below.
Method 1-first row in managed bean
public void addNewPurchaseVoucher(ActionEvent actionEvent) { // Add event code here... BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator"); RowSetIterator rsi = dciter.getRowSetIterator(); Row lastRow = rsi.last(); int lastRowIndex = rsi.getRangeIndexOf(lastRow); Row newRow = rsi.createRow(); newRow.setNewRowState(Row.STATUS_NEW); rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow); rsi.setCurrentRow(newRow); BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator"); RowSetIterator rsi1 = dciter1.getRowSetIterator(); Row lastRow1 = rsi1.last(); int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1); Row newRow1 = rsi1.createRow(); newRow1.setNewRowState(Row.STATUS_NEW); rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1); rsi1.setCurrentRow(newRow1); }
Method of doDML() of line 2 seconds in the entityImpl class
protected void doDML(int operation, TransactionEvent e) { setAmount(getPurqty().multiply(getUnitpurprice())); if (operation == DML_INSERT) { insertSecondRowInDatabase(getVid(),getLineitem(),getDebitst(), (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); } if(operation == DML_UPDATE) { updateSecondRowInDatabase(getVid(),getLineitem(),getDebitst(), (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100)); } super.doDML(operation, e); } private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4) { PreparedStatement stat = null; try { String sql = "Insert into vdet (VID,LINEITEM,DEBITST,AMOUNT) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "')"; System.out.println("sql= " + sql); stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } } private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4) { PreparedStatement stat = null; try { String sql = "update vdet set vid='"+ value1+"',lineitem='"+ value2+"',DEBITST='" + value3 + "', AMOUNT='" + value4 + "' where VID='" + VID + "'"; System.out.println("sql= " + sql); stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } }
Now the problem is that when later I change the quantity and price of the first line isn't updated but second row, because I used the command
<af:button actionListener="#{bindings.Commit.execute}" text="Commit"
This button update the first line added by bean managed, but the second row remains unchanged.
Please help how to update the two lines with the same button or something else.
Concerning
DML_UPDATE will call only if there is some change data attributes.
I guess that the update statement is false because vid looks like a primary key for the table, then, how update you the primary key of the update statement and how the update condition statement where the vid = '0'
I assume the update statement should look like:
private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4) { PreparedStatement stat = null; try { String sql = "update vdet set lineitem='" + value2 + "',DEBITST='" + value3 + "', AMOUNT='" + value4 + "' where VID='" + value1 + "'"; System.out.println("sql= " + sql); stat = getDBTransaction().createPreparedStatement(sql, 1); stat.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { stat.close(); } catch (Exception e) { e.printStackTrace(); } } }
-
Component ODI OWB 11 GR 2 How to connect lines inserted/updated to update / delete
Hi experts,
I developed an ICT KM which will insert into a target table data line-by-line, I used the ICT_SQL_INCR_UPD_ROW_BY_ROW KM of base provided by oracle, what I noticed, is that this newspaper does not work lines that are inserted as other KMs, after that a little research on the internet discovered that ODI has a function for this , oidRef.setNbInsert, but this doesn't work in OWB KM, it gives this error:
--------------
Traceback (innermost last):
"< String >" file, line 305, inside?
AttributeError: setNbInsert
[12: 02:05] Szabo Adorian: org.python.core.Py.AttributeError (Py.java)
org.python.core.PyInstance.invoke (PyInstance.java)
org. $0 Python.pycode._pyx64.f (< string >: 305)
org. Python.pycode._pyx64.call_function (< string >)
org.python.core.PyTableCode.call (PyTableCode.java)
org.python.core.PyCode.call (PyCode.java)
org.python.core.Py.runCode (Py.java)
org.python.core.Py.exec (Py.java)
--------------
Dose - anyone have an ideea how can I connect the inserted, updated, deleted in interface OWB lines (we have a customer who would like tho have this feature)?
Enjoy a quick response,
CIPIHi CIPI
Unfortunately, it is not included, the only possible audit for lines is via JDBC and properties explanations in KM.
So not every API of ODI is supported, a large common subset is available, you can see the doc for more details (these audit would be useful);
http://download.Oracle.com/docs/CD/E11882_01/OWB.112/e10935/code_tempates.htm#CIHIIJDISee you soon
David -
TRIGGER BEFORE INSERT OR UPDATE OR DELETE
I want to create a single trigger before each insert or update or delete, a record gets copied into the AUDIT table. works very well on the insertion and to day but you have problem clear.
Can you please help me debug this error. The problem of mutation.
create or replace
BIU_FS_Test_T RELAXATION
BEFORE INSERT OR UPDATE OR DELETE
ON FS_Test
REFERRING AGAIN AS NINE OLD AND OLD
FOR EACH LINE
DECLARE
number of voffender_history_id;
Start
IF the INSERTION
SELECT FS_Test_history_seq. nextval in the double voffender_history_id;
INSERT INTO FS_Test_history (OFFENDER_HISTORY_ID,
OFFENDER_ID, FIRST_NAME, MIDDLE_NAME, LAST_NAME.
SX, SKIN_TONE, HEIGHT, WEIGHT, RACE, EYE_COLOR,
HAIR_COLOR, BLOOD_TYPE, VARIOUS, DATE_OF_BIRTH.
PLACE_OF_BIRTH, TRANSACTION)
VALUES (voffender_history_id,
: new. OFFENDER_ID,: new. First name: new. MIDDLE_NAME,: new. LAST_NAME,
: new. RACE: new. SX,: new. SKIN_TONE,: new. HEIGHT: new. WEIGHT: new. EYE_COLOR,
: new. HAIR_COLOR,: new. BLOOD_TYPE,: new. VARIOUS: new. DATE_OF_BIRTH,
:new. PLACE_OF_BIRTH,
"INSERT");
ELSIF UPDATE
et (
NVL (:OLD. First name, 'x') <> nvl():NEW. First name, 'x') or
NVL (:OLD. MIDDLE_NAME, 'x') <> nvl():NEW. MIDDLE_NAME, 'x') or
NVL (:OLD. Last_name, 'x') <> nvl():NEW. Last_name, 'x') or
NVL (:OLD. RACE 0) <> nvl():NEW. RACE 0) or
NVL (:OLD. SX 0) nvl(:NEW <>.) SX 0) or
NVL (:OLD. SKIN_TONE 0) <> nvl():NEW. SKIN_TONE 0) or
NVL (:OLD. HEIGHT 0) <> nvl():NEW. HEIGHT 0) or
NVL (:OLD. WEIGHT 0) <> nvl():NEW. WEIGHT 0) or
NVL (:OLD. EYE_COLOR 0) <> nvl():NEW. EYE_COLOR 0) or
NVL (:OLD. HAIR_COLOR 0) <> nvl():NEW. HAIR_COLOR 0) or
NVL (:OLD. BLOOD_TYPE 0) <> nvl():NEW. BLOOD_TYPE 0) or
NVL (:OLD. VARIOUS, ' x') <> nvl():NEW. VARIOUS, ' x') or
NVL (:OLD. DATE_OF_BIRTH, January 1, 1900 ") <> nvl():NEW. " DATE_OF_BIRTH, January 1, 1900 ") or"
NVL (:OLD. PLACE_OF_BIRTH 0) <> nvl():NEW. PLACE_OF_BIRTH 0)
)
THEN
SELECT FS_Test_history_seq. nextval in the double voffender_history_id;
INSERT INTO FS_Test_history (OFFENDER_HISTORY_ID,
OFFENDER_ID, FIRST_NAME, MIDDLE_NAME, LAST_NAME.
SX, SKIN_TONE, HEIGHT, WEIGHT, RACE, EYE_COLOR,
HAIR_COLOR, BLOOD_TYPE, VARIOUS, DATE_OF_BIRTH.
PLACE_OF_BIRTH, TRANSACTION)
VALUES (voffender_history_id,
: new. OFFENDER_ID,: new. First name: new. MIDDLE_NAME,: new. LAST_NAME,
: new. RACE: new. SX,: new. SKIN_TONE,: new. HEIGHT: new. WEIGHT: new. EYE_COLOR,
: new. HAIR_COLOR,: new. BLOOD_TYPE,: new. VARIOUS: new. DATE_OF_BIRTH,
:new. PLACE_OF_BIRTH, "UPDATE");
ELSIF DELETION THEN
SELECT FS_Test_history_seq. nextval in the double voffender_history_id;
SELECT FS_Test_history_seq. nextval in the double voffender_history_id;
INSERT INTO FS_Test_history (OFFENDER_HISTORY_ID,
OFFENDER_ID, FIRST_NAME, MIDDLE_NAME, LAST_NAME.
SX, SKIN_TONE, HEIGHT, WEIGHT, RACE, EYE_COLOR,
HAIR_COLOR, BLOOD_TYPE, VARIOUS, DATE_OF_BIRTH.
PLACE_OF_BIRTH, TRANSACTION)
VALUES (voffender_history_id,
: new. OFFENDER_ID,: new. First name: new. MIDDLE_NAME,: new. LAST_NAME,
: new. RACE: new. SX,: new. SKIN_TONE,: new. HEIGHT: new. WEIGHT: new. EYE_COLOR,
: new. HAIR_COLOR,: new. BLOOD_TYPE,: new. VARIOUS: new. DATE_OF_BIRTH,
:new. PLACE_OF_BIRTH, 'CLEAR');
END IF;
end;
Error I get
Error from the 1 in the command line:
Remove from the fs_test where PK = 41476
Error report:
SQL error: ORA-04091: table get OUT. SOR_O_HISTORY is changing, function of triggering/can not see
ORA-06512: at «GET. » BIU_FS_TEST_T', line 111
ORA-04088: error during execution of trigger ' EB. BIU_FS_TEST_T'
04091 00000 - «table %s. » "%s is changing, function of triggering/can not see.
* Cause: A trigger (or plsql user-defined function that is referenced in)
( this statement) attempted to watch (or modify) a table that has been
in the middle to be modified by the statement that shot.
* Action: Rewrite the trigger (or function) so it does not read this table.
PS 11g r2
Thank you.
n_shah18-
Is there a parent-child relationship between the tables involved in the triggering event? Is there a foreign key used above the child table that references the parent table?
If you have a parent-child relationship and a trigger on the parent table must be running some DML on the child table, and, if the child table as a foreign key (FK) back to the parent table, any DML on the child table will cause a recursive SQL statement to check the constraint. Indirectly, this will cause an exception table mutation.
So watch the dependencies on SOR_O_HISTORY / FS_TEST_HISTORY/all other related table. A FOREIGN KEY can make it to mutate (no pun intended).
Hope this will help you find the root cause.
-
The separate display - process success Message - for INSERT/UPDATE/DELETE
Hello
When we either Insert/update/delete records of shape of the APEX, it fires the Page - processing of automatic line (DML) process and displays the following message - process success Message
-File has been processed.
Is there a way for each of them, we can change this message...
I mean, if the creation of a new record - message should be - record has been created... his way... If update... * manual has been updated *... and so on...
Thank you
DeepakHello
One way is to create a component hidden from this page and calculation value according page submit the request.
for example if the application is updated then the item value record has been updated.Then put this point to the message of successful treatment of automatic line (DML) as & Px_YOUR_ITEM.
Hope this helps
BR, Jari
Maybe you are looking for
-
Satellite A200-1CR - black screen and no boot
Model:Toshiba Satellite A200-1CR Question:By pressing the power button to power on the computer for a full boot, the power LED lights up but still black screen (not even of lighting). The logo led 'Satellite' in the lower left corner of the chassis r
-
Satellite Pro A200: A continuous beep on startup top and freezing
Hello It comes to Varun of India. Could someone please help me solve a problem which has been haunting me the last two days. This problem is currently arising in my Pro A200 satellilte. Actually, the problem is that one continuous beep sound from int
-
Sound is played through speakers with headphones plugged?
I had just driven back one of my audio drivers (which is Cirrus Logic CS4206A AB 78) after the last version is not about me. Who restored the sound from the computer, but after trying to plug my headphones into the headphone, I tried to play video fi
-
M277dw MFP: MFP M277dw code using PC application windows10
Can you help me find the claim code
-
Windows Firewall 0x6D9 error code
My firewall automatically turned off and does not say "Windows Firewall with Security Advanced snap-in failed to load." Restart the Windows Firewall service on the computer that you are managing. Error code "0x6D9. http://answers.Microsoft.com/en-us/