Trigger after insert
After an insertion in table 1, I want to take the value of the transaction and use it in a custom to insert trigger in an another datbase 2 values. One is the primary key of the table 1 transaction value and the other is a variable of the connected user's session. I can get the value of the user of the session, but I can't get the value of the transaction field.
$updateRequestDate = "INSERT INTO request_notify (id_request, username) Values ({rsrequest.id_request}," ".). $_SESSION ["kt_login_user"]. "')";
$update_result = $tNG-> connection-> execute ($updateRequestDate);
{if(!$update_result)}
$updateError = new tNG_error ("' error affecting the logged in State to N ', array(), Array();")
Return $updateError;
} else {}
return null;
}
I have the custom trigger after insert transaction.
How do you get the value of a transaction for a custom trigger field?
Please try with the help of the
$tNG-> getColumnValue ("column_name")
method instead.
See you soon,.
Günter
Tags: Dreamweaver
Similar Questions
-
trigger after insert in tables MASTER DETAILS, adding bonuses to employees
Hi Experts, I am a beginner in PL/SQL and triggers
=========================
I have two tables:
MASTER (DOC_NO, DOC_DATE, BONUS)
DETAILS (EMP_NO, EMP_NAME, EMP_BONUS)
I need to distribute the (BONUS) column in table (MASTER) to column (EMP_BONUS) in DETAILS
by equal parts.
I need it in (trigger after insert)
EMP_BONUS: is BONUS count (EMP_NO);.
example:
BONUS = 100
No EMP_NO = 20
This means (EMP_BONUS = 100/20 = 5).
I use the 6.0 with 9i DB form
Help, pleaseRARA says:
Hi Experts, I am a beginner in PL/SQL and triggers
=========================
I have two tables:
MASTER (DOC_NO, DOC_DATE, BONUS)
DETAILS (EMP_NO, EMP_NAME, EMP_BONUS)I need to distribute the (BONUS) column in table (MASTER) to column (EMP_BONUS) in DETAILS
by equal parts.
I need it in (trigger after insert)
EMP_BONUS: is BONUS count (EMP_NO);.
example:
BONUS = 100
No EMP_NO = 20This means (EMP_BONUS = 100/20 = 5).
I use the 6.0 with 9i DB form
Help, pleaseIf you want to do after insertion and forms... You can use the trigger to insert after and try something like this
declare a number; begin select count(emp_no) into a from master; update details set emp_bonus=:bonus/a; commit; end;
Hope this helps
If someone useful or appropriate, please mark accordingly.
-
Create the trigger after insert
Hello
I would like to ask how to create a trigger after insert on a table. Basically, what I wanted to do are when an insert to table1 it will insert the records to table2. But the problem is that folders that will be inserted in the new tables are entries/fields, who lived in NEW York City (on table of ld)
after insertion, I wanted to add another field in table2 as status
create table table1)
Name varchar2 (55),
City varchar2 (55)
);
create (table2)
Name varchar2 (55)
status int (1)
)
Hope you could help me.
Thank you
Best regardsantok1015 wrote:
HelloI would like to ask how to create a trigger after insert on a table. Basically, what I wanted to do are when an insert to table1 it will insert the records to table2.
It's easy...
SQL> create table table1( 2 Name varchar2(55), 3 City varchar2(55) 4 ); Table created. SQL> SQL> create table table2 ( 2 Name varchar2(55), 3 status number(1) 4 ); Table created. SQL> SQL> create or replace trigger trg_tbl1 after insert on table1 2 for each row 3 begin 4 insert into table2 values (:new.name, 1); 5 end; 6 / Trigger created. SQL> insert into table1 values ('Fred','Bob'); 1 row created. SQL> select * from table2; NAME STATUS ------------------------------------------------------- ---------- Fred 1 SQL>
But the problem is that folders that will be inserted in the new tables are entries/fields, who lived in NEW York City (on table of ld)
after insertion, I wanted to add another field in table2 as status
This is not sensible. Please explain what you mean.
-
Trigger AFTER INSERT or UPDATE run twice
Hi people! I have a problem with this trigger, if I insert a record, INSERTING run 2 times still, I guess that the problem is in AFTER INSERTION or UPDATE of THE SAL ON EMP, but I can't find the solution, I m used to read a lot but nothing... Any idea? Thank you and sorry my bad English.
PD: I use oracle database 9i 9.2.0.1.0 enterprise
CREATE OR REPLACE TRIGGER TEMA10EJER1
AFTER INSERTION OR UPDATE OF THE SAL ON EMP
FOR EACH LINE
BEGIN
IF THE INSERTION
UPDATE DEPT
PRESUPUESTO SET = PRESUPUESTO +: new.sal
Where: new.deptno = deptno;
ELSIF UPDATING ('sal') THEN
UPDATE dept
Presupuesto SET = presupuesto -: old.sal +: new.sal
WHERE: new.deptno = deptno;
END IF;
END;Check your DEPT table, may be there is another trigger that inserting a new record.
-
Problem with trigger AFTER INSERT
Hi all
I am updating a column in the table by adding 2 characters 'a_' after INSERTION using the trigger.
Now when I insert data in the table a trigger is fired for INSERTION.
According to the syntax, I think that we cannot pass parameters in a trigger.
I have a test10 table that looks like this.
If I omit the WHERE clause, all records are updated. Is there another way to solve the problem?t1 varchar2(10) t2 varchar2(10) t3 varchar2(10) t4 number t5 number t1 is kinda primary_key and t2 is unique though the table isn't structured like that but the data in it follows that. The code in the trigger looks like this CREATE OR REPLACE TRIGGER test10_t1 AFTER INSERT ON test10 FOR EACH ROW BEGIN IF INSERTING THEN UPDATE test10 SET t1 = 'a_'||:old_value WHERE t1 = ?; -- I need to mention the parameter here but not sure if we can pass param in a trigger END IF; END;
THX
Rod.There is no need to use a clause of update.
Have you tested the relaxation that I suggested in my last post?
-
trigger for insertion of a table to another table
Hello again,
I tried to write a trigger after insert or update will happen in table 1, it will move some values in another table, as shown below:
Create or replace trigger Insert_Amount_Credit after insert or update on Reciept_Voucher
Referencing NEW AS NEW OLD OLD FOR EACH LINE AS
StartInsert into customer_Details (Transaction_Date, client_name, Description, credit) values (new. Rec_Date, new. Client_name, CONCAT (' receipt number:', again.) Rec_ID), new. Amount);
End;
/
The trigger was created but with compilation error... and my question is:
1. How do I write the code above in the best way?
2. How can I enough the other table with a table concatenated as what I was trying to make above?
any idea?
Something like that?
CREATE OR REPLACE TRIGGER trig_ins_testtrg2
BEFORE INSERT OR UPDATE ON test_trg1
FOR EACH LINE
BEGIN
INSERT INTO test_trg2 (curr_date,
job_id,
reason,
credit)
VALUES (SYSDATE,
: NEW.id,.
: NEW.receipt_no |:NEW.description,.
(: NEW.amount);
END;
-
After insert trigger mutation of error, what is the way to overcome it.
I have two tables namely profiles_answers and user_profileanswers. Based on the requirement that is: when a user inserts the answer in the table of user_profileanswers I need to calculate the weight-age of this issue with the many options available in the profiles_answers table and update this table user_profileanswers age-weight. So, for that, I wrote the following after trigger insert. But when I try to insert it throws me error mutation. As I update the table, used to insert action in the trigger. Please let me how can know I solve this problem.
create or replace
AI_weightageCaluculation TRIGGER AFTER
FOR EACH row INSERT on user_profileanswers
BEGIN
DECLARE
v_a VARCHAR2 (50);
YaeUb VARCHAR2 (50);
V_c VARCHAR2 (50);
v_d VARCHAR2 (50);
ve VARCHAR2 (50);
a_weightage NUMBER;
b_weightage NUMBER;
c_weightage NUMBER;
d_weightage NUMBER;
e_weightage NUMBER;
BEGIN
SELECT option_a, option_b, option_c, option_d, option_e IN
v_a, YaeUb, v_c, v_d, profiles_answers FROM ve
WHERE profile_questions_id =: new.profilequestion_id;
IF (v_a IS NOT NULL AND YaeUb IS NOT NULL AND v_c IS NOT NULL AND v_d IS NOT NULL AND EV IS NOT NULL) THEN
BEGIN
a_weightage: = 85;
b_weightage: = 60;
c_weightage: = 45;
d_weightage: = 30;
e_weightage: = 15;
END;
ELSIF (v_a IS NOT NULL AND YaeUb IS NOT NULL AND v_c IS NOT NULL AND v_d IS NOT NULL AND ve IS NULL) THEN
BEGIN
a_weightage: = 85;
b_weightage: = 60;
c_weightage: = 30;
d_weightage: = 15;
END;
ELSIF (v_a IS NOT NULL AND YaeUb IS NOT NULL AND v_c IS NOT NULL AND v_d IS NULL AND ve IS NULL) THEN
BEGIN
a_weightage: = 85;
b_weightage: = 45;
c_weightage: = 15;
END;
ON THE OTHER
BEGIN
a_weightage: = 85;
b_weightage: = 15;
END;
END IF;
IF: new.answer = 'A' THEN
BEGIN
UPDATE user_profileanswers
SET weightage = a_weightage
WHERE user_id =: new.user_id
AND profileanswer_id =: new.profileanswer_id
AND profilequestion_id =: new.profilequestion_id;
END;
ELSIF: new.answer = 'B' THEN
BEGIN
UPDATE user_profileanswers
SET weightage = b_weightage
WHERE user_id =: new.user_id
AND profileanswer_id =: new.profileanswer_id
AND profilequestion_id =: new.profilequestion_id;
END;
ELSIF: new.answer = 'C' THEN
BEGIN
UPDATE user_profileanswers
SET weightage = c_weightage
WHERE user_id =: new.user_id
AND profileanswer_id =: new.profileanswer_id
AND profilequestion_id =: new.profilequestion_id;
END;
ELSIF: new.answer = ' THEN
BEGIN
UPDATE user_profileanswers
SET weightage = d_weightage
WHERE user_id =: new.user_id
AND profileanswer_id =: new.profileanswer_id
AND profilequestion_id =: new.profilequestion_id;
END;
ON THE OTHER
BEGIN
UPDATE user_profileanswers
SET weightage = e_weightage
WHERE user_id =: new.user_id
AND profileanswer_id =: new.profileanswer_id
AND profilequestion_id =: new.profilequestion_id;
END;
END IF;
END;
END;
Thanks in advance.
Hmm... Why do after insertion?
CREATE OR REPLACE TRIGGER BI_weightageCaluculation
FRONT INSERT ON user_profileanswers FOR EACH ROW
BEGIN
SELECT BOX: NEW. RESPONSE
WHEN 'A' a_weight THEN
WHEN 'B' THEN b_weight
WHEN 'C' THEN c_weight
When ' THEN d_weight
Of OTHER e_weight
END
in: new.weightage
(SELECT 85 a_weight
Case option_result
WHEN 31 THEN 60
WHEN 15 THEN 60
WHEN 7 THEN 45
another 15
end b_weight
Case option_result
WHEN 31 THEN 45
WHEN 15, THEN 30
When 7 then 15
END c_weight
Case option_result
WHEN 31 THEN 30
When 15 then 15
END d_weight
Case option_result
WHEN 31 THEN 15
END e_weight
FROM (SELECT DECODE (option_a, NULL, 0, 1) +)
Decode (option_b, NULL, 0, 2) +.
Decode (option_c, NULL, 0, 4) +.
Decode (option_d, NULL, 0, 8) +.
Decode(option_e,,0,16) option_result
OF profiles_answers
WHERE profile_questions_id =: new.profilequestion_id));
END;
/
HTH
-
Create a trigger that send mail with attachment after insertion of a line in Oracle APEX
I want to create an insert after trigger on a table that is to send a mail with an attachment. Here is my code.
CREATE OR REPLACE TRIGGER tr_feedback
AFTER INSERT on REVIEWS
FOR EACH LINE
DECLARE
l_id NUMBER;
BEGIN
l_id: = APEX_MAIL. SEND)
p_to => ' [email protected] ',
P_FROM = >: NEW. E-mail
p_subj = >: NEW. Object
p_body = > "Please see the attachment."
p_body_html = > ' review of < b > please < /b > the attachment ")
APEX_MAIL. ADD_ATTACHMENT (p_mail_id = > l_id,)
p_attachment = >: NEW. FILE,
p_filename = >: NEW. FILE NAME,
p_mime_type = >: NEW. MIME);
END;
But when I insert data, I get the following error:
ORA-20022: Null value provided for the parameter p_filename.
ORA-06512: at "APEX_040200.WWV_FLOW_MAIL", line 1070
ORA-06512: at "APEX_040200.WWV_FLOW_MAIL_API", line 141
ORA-06512: at "TR_FEEDBACK", line 11
ORA-04088: error during execution of trigger 'TR_FEEDBACK '.
Now, how can I fix that? Thanks in advance.
Agree with the above. Triggers (ab) should not be used in this way. Nontransactional process should not be based on a transactional trigger. These processes are part of the business logic and should be at the level of the company of codification (Summit, you can add a process to be executed once the completed insertion)
-
need, update the message after inserting the trigger data
Hi all
CREATE OR REPLACE TRIGGER xxc_student
AFTER INSERTION
WE raise
BEGIN
Dbms_output.put_line ('end of Inserted');
END;
And I want to insert data into the table:
INSERT INTO student (name) VALUES ("ABC");
INSERT INTO student (name) VALUES ("CCC");
INSERT INTO student (name) VALUES ('DDD');
INSERT INTO student (name) VALUES ("EEA").
COMMIT;
I have the following results:
1 row inserted
end of Inserted
1 row inserted
end of Inserted
1 row inserted
end of Inserted
1 row inserted
end of Inserted
ENGAGE
And I would have
1 row inserted
1 row inserted
1 row inserted
1 row inserted
end of Inserted
Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
Thank you
No, this isn't possible; e by a trigger. Relax, you have created is a statement after trigger, so it fires after the insert statement is complete. In the first example, you have 4 separate SQL statements, so the trigger is activated after each statement. In your second example, you have a single SQL statement that affects the 4 lines, if the trigger is activated once the end of the statement.
The number of inserted rows is reported since sqlplus (the client), based on what the engine SQL in the database said he did. Since there is only a single statement engine SQL reports 4 lines inserted at the client, not four row insertions.
What problem are you trying to solve with this approach? In General, dbms_output is not much used in production code, except occasioanlly as a simple debugging tool.
John
-
Insertion trigger after (does not work)
SQL> DESC MN_MDV_DET Name Null? Type ----------------------------------------- -------- ---------------------------- MDV_NO VARCHAR2(10) MDV_DATE DATE ITEM_NO VARCHAR2(10) ITEM_DESCP VARCHAR2(100) UOM VARCHAR2(10) ITEM_QTY NUMBER(6) BAL_QTY NUMBER(6) REMARKS VARCHAR2(30) ITEM_STAT NUMBER(1) GVN_QTY NUMBER(6) MRF_NO VARCHAR2(10) MRF_DATE DATE SQL> DESC MN_ITEM_PNDNG_ISU Name Null? Type ----------------------------------------- -------- ---------------------------- MRF_NO VARCHAR2(10) MRF_DATE DATE MDV_NO VARCHAR2(10) MDV_DATE DATE ITEM_NO VARCHAR2(10) ITEM_DESCP VARCHAR2(100) UOM VARCHAR2(10) REQ_QTY NUMBER(6) GVN_QTY NUMBER(6) BAL_QTY NUMBER(6) PNDNG_DATE DATE REMARKS VARCHAR2(60)
I'm writing the code block block of details and waiting for inserting record on MN_ITEM_PNDNG_ISU belowSQL> SELECT MDV_NO,MDV_DATE,ITEM_NO FROM MN_MDV_DET WHERE ITEM_STAT=0; MDV_NO MDV_DATE ITEM_NO ---------- --------- ---------- DV-1001 28-JUL-12 1010143 SQL> SELECT MDV_NO,MDV_DATE,ITEM_NO FROM MN_MDV_DET WHERE ITEM_STAT=1; MDV_NO MDV_DATE ITEM_NO ---------- --------- ---------- DV-1001 28-JUL-12 1010138 DV-1001 28-JUL-12 1010100
but when I put the condition WHERE it was not inserting record in MN_ITEM_PNDNG_ISU and when I remove the WHERE Condition it works smoothly. something wrong in my trigger for insertion after?
I want to insert records on MN_ITEM_PNDNG_ISU where ITEM_STAT = 0 or NULL only. as above query run in SQL Prompt.
ConcerningINSERT INTO MN_ITEM_PNDNG_ISU (MRF_NO , MRF_DATE , MDV_NO , MDV_DATE , ITEM_NO , ITEM_DESCP , UOM , REQ_QTY , GVN_QTY , BAL_QTY , PNDNG_DATE , REMARKS ) SELECT :MN_MDV_DET.MRF_NO, :MN_MDV_DET.MRF_DATE, :MN_MDV_DET.MDV_NO, :MN_MDV_DET.MDV_DATE, :MN_MDV_DET.ITEM_NO, :MN_MDV_DET.ITEM_DESCP, :MN_MDV_DET.UOM, :MN_MDV_DET.ITEM_QTY, :MN_MDV_DET.GVN_QTY, :MN_MDV_DET.BAL_QTY, SYSDATE, :MN_MDV_DET.REMARKS FROM MN_MDV_DET WHERE :MN_MDV_DET.ITEM_QTY=0;
Hello
Try:
If nvl(:MN_MDV_DET.) ITEM_STAT, 0) = 0 then
INSERT INTO MN_ITEM_PNDNG_ISU
(MRF_NO,
MRF_DATE,
MDV_NO,
MDV_DATE,
ITEM_NO,
ITEM_DESCP,
UNIT OF MEASURE,
REQ_QTY,
GVN_QTY,
BAL_QTY,
PNDNG_DATE,
REMARKS)
Values)
: MN_MDV_DET. MRF_NO,
: MN_MDV_DET. MRF_DATE,
: MN_MDV_DET. MDV_NO,
: MN_MDV_DET. MDV_DATE,
: MN_MDV_DET. ITEM_NO,
: MN_MDV_DET. ITEM_DESCP,
: MN_MDV_DET. UNIT OF MEASURE,
: MN_MDV_DET. ITEM_QTY,
: MN_MDV_DET. GVN_QTY,
: MN_MDV_DET. BAL_QTY,
SYSDATE,
: MN_MDV_DET. REMARKS);end if;
-
I am trying to write a trigger that will update a neck date after each insertion.
CREATE OR REPLACE TRIGGER PS1. XX_CDATE
AFTER INSERT ON ps1.COMMNPLANBUDGET
Old SEO AS OLD AS new NEW
FOR EACH LINE
declare the PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
Update ps1.COMMNPLANBUDGET set CREATION_DATE = sysdate where PROJECTID =: new. PROJECTID;
commit;
END XX_CDATE;
For the same thing, I wrote the code above, it created successfully but when I am inserting a record pass date is not updated. Please let me know where I did wrong. Thanks in advanceIt's everything you want
create or replace trigger ps1.xx_cdate before insert on ps1.commnplanbudget referencing old as old new as new for each row begin :new.creation_date := sysdate; end xx_cdate;
Use a trigger to insert BEFORE and just change the: NEW value
-
FRM-40735: trigger for INSERTION after raised unhandled exception ORA-25207
Hello
I am trying to create custom applications. In that when creating custom responsibility I get the following error
FRM-40735: trigger for INSERTION after raised unhandled exception ORA-25207
I know ORA-25207 is related to the activation of the queues, but how do I find out which queue this error is ponting at.
File alertlog Checked, $APPLCSF / $APPLLOG found nothing.
Any help is appreciated
Concerning
TaherPL see if the steps described in MOS Doc 211095.1 (11, 5 - AP: Frm-40735: trigger of sur-Commit not triggered managed Ora - 25207 Exception on APXPAWKB) can help.
It is an odd error and should not occur when you create custom responsibilities. You have customizations/triggers/customizations enabled on the form of accountability?
HTH
Srini -
After insert trigger. How you assign value to variable?
Was wondering if I could get a little help please... I have no experience in PL\SQL... The underside of the trigger fires when inserting another table and this trigger adds lines to another table... When you try to assign "bdate" one value from another table, I can't compile trigger... The ORA-04084 getting when you try to compile... Can someone tell me what the problem is in the code please?
Thank you
Curtis
CREATE OR REPLACE TRIGGER "HKSM. "' CHILLPK_IAR ' AFTER
INSERT ON 'CHILLPACK' FOR EACH LINE
DECLARE
bdate SAPUPLOAD.mfgdate%TYPE;
BEGIN
IF: New.sku NOT IN ("REPRISE", "EMT") THEN
IF TO_CHAR (: new .adddate, 'HH24:MI:SS'), ' 04:00:00 ' THEN
-adddate = production, last updated date
: New.adddate: =: New.adddate-1;
END IF;
-bdate = mfgdate (date of slaughter of the inventory)
Mfgdate SELECT INTO bdate INVENTORY
WHERE RTRIM (containerkey) = RTRIM(:New.containerkey)
AND RTRIM (sku) = RTRIM(:New.sku);
INSERT INTO SAPUPLOAD)
SKU,
quantity,
WGT,
mfgdate,
PFLAG,
rtype,
containerId,
batchdate)
VALUES)
: New.sku,.
: New.traysproduced,.
: New.weightproduced,.
: New.adddate,.
NULL,
'CREATE ',.
: New.containerkey,.
bdate);
END IF;
END;user3954362 wrote:
Thanks for your reply... So why doesn't this work?Create or replace TRIGGER "HKSM. "' CHILLPK_IAR ' AFTER
INSERT ON 'CHILLPACK' FOR EACH LINE
DECLARE
bdate sapupload.mfgdate%TYPE;
BEGIN
If: New.sku not in ("REPRISE", "EMT") then
If to_char (: new .adddate, 'HH24:MI:SS')< '05:30:00'="">
bdate: =: New.adddate - 1;
On the other
bdate: =: New.adddate;
End If;
Insert into SAPUPLOAD
(sku qty, wgt, mfgdate, pflag, rtype, containerid, batchdate)
Values
(: New.sku,:New.traysproduced,:New.weightproduced,:New.adddate, null, 'CREATE',:New.containerkey, bdate);
End If;
End;Because you are not trying to change a new value that you were with this line in your original post:
:New.adddate := :New.adddate -1;
-
Updating of the table after insert shows empty cells
Hello experts,
I'm trying to insert some custom values of certain fields in a table displayed on my page. The table comes a VO based entity with a sequence number and a few constraints.
The sequence numbers batteries managed automatically by the database.
The entry fields are related to a bean managed to get the value with 'GetValue' and then I create a string for the entry. The string then gets cut in the VO as some attributes with the following SQL calculation example:
REGEXP_SUBSTR (attribut3, "[^,] +' 1, 5")
But it is on the ViewObject/database layer.
After I call the method of the VO Impl to create the new line like this:
Managed bean:
OperationBinding operationBinding = bindings.getOperationBinding ("addRow");
operationBinding.getParamsMap () .put ("Value1", someInt);
operationBinding.getParamsMap () .put ("Value2", someIntToo);
operationBinding.getParamsMap () .put ("Value3", someString);
operationBinding.execute ();
Impl VO:
' public void addRow (integer value1, value2 Integer, String value3) {}
ViewObject vo = this;
NewRow row = vo.createRow ();
newRow.setAttribute ("attribut1", value1);
newRow.setAttribute ("attribut2", value2);
newRow.setAttribute ("attribut3", value3);
vo.insertRow (newRow);
this.getDBTransaction () .commit ();
}
I capture without exception again, but when I place everything correctly and trigger the code bean managed via a button action, the table shows the new line with the correct integers, but the channel cut in two by the calculation of SQL from the top shows only blank cells. After that research with the filter of the table and remove the search filter once again, the strings appear correctly.
For example, after you insert:
Then, after 'refreshment' with the filter:
What can I do about it? I can't really put the data through the InsertWithParams, because I need build the string with the Java Code.
It only does not show data after insertion, PartialTrigger (s) also will not work.
You must re-run the sql query after validation (with: vo.executeQuery ())
Dario
-
Hi all
I have a scenario that t_sum of the table will be empty and t_egree table will be created by importing the file.CREATE TABLE "T_EGREE" ( "LIDER" NUMBER(5,0), "TYPE NUMBER(1,0) CONSTRAINT "T_EGREE_PK" PRIMARY KEY ("LIDER", "TYPE") ENABLE) CREATE OR REPLACE TRIGGER "AI_T_EGREE" after insert or update on T_EGREE for each row begin if inserting then insert into t_sum (lider,type,AMOUNT) values (:NEW.lider,:NEW.type,0); end if; if updating then insert into t_sum (lider,TYPE,AMOUNT) values (:NEW.lider,:NEW.type,0); end if; exception when others then RAISE_APPLICATION_ERROR (-20505,'insert/update on t_egree failed , due to unique constraint on table t_sum'); END; suppose that t_egree contains 34 rows . ------------------------------------------------------------- CREATE TABLE "T_SUM" ( "LIDER" NUMBER(5,0), "TYPE" NUMBER(1,0), "AMOUNT" NUMBER(3), CONSTRAINT "T_SUM_PK" PRIMARY KEY ("LIDER", "TYPE") ENABLE)
in this case, after you import the table of t_egree, the t_sum table will be blank.
is there a solution to overcome this problem?
Thanks in advance
NaamaDon't do the following:
when others then RAISE_APPLICATION_ERROR (-20505,'insert/update on t_egree failed , due to unique constraint on table t_sum');
You are hiding the real error, which are not necessarily always an ORA-00001...
Get rid of these three lines in your code.
Maybe you are looking for
-
I am running Win7 Pro 32-bit. On my XP machine, a disk cleanup deletes all the collected credentials, but I can't get rid of one incorrect in this computer. He has not come if I go to Earthlink WebMail use IE, if the ID is stored somewhere in Firefox
-
ProBook G2: Installation of Windows ProBook problem
My apologies if this has already been posted, but I searched for the most relevant posts that I could find. I am trying to install Windows 7 on this unit, but it stops car detecing CD external & key USB once I have this boot from the BIOS. Is there n
-
Cannot use keyboard IntelliType Pro 5.0 with Windows 7
Original title: Hi, help upgrade IntelliType Pro 5.0 I have a keyboard and wireless mouse. It's an Intellitype Pro 5.0. I now have a new computer which has windows 7. My wireless keyboard installation disc does not support and I can't find an update
-
How to display specific records on the form of the ADF
Dear experts,I need to create a form of adf Wizard.-If the user is new, this form will show action createInsert.-If the user is not new (already have saved data), then this screen displays data based on the user login id.I can do the application modu
-
Gap phone build for iOS is not because of the WhitelistPlugin
HelloMy version of iOS is a failure due to an error in com.indigoway.cordova.whitelist.WhitelistPlugin. The amount of the fine for Android build.All points will be a great help.In file included from /project/edumerge/Plugins/com.indigoway.cordova.whi