Skip to main content
Question

i m trying to create the before delete trigger to execute the following

  • July 16, 2018
  • 1 reply
  • 20 views

CREATE OR REPLACE TRIGGER invoice_before_delete BEFORE DELETE ON prj_invoice_work_exe FOR EACH ROW DECLARE v_username varchar2(10); BEGIN SELECT user INTO v_username FROM dual; INSERT INTO prj_invoice_work_exe1 ( PIE_PIN_ID,PIE_TDT_ID,PIE_ID,PIE_QTY_EXECUTED,PIE_UNIT_PRICE,PIE_NET_PRICE,PIE_INVOICED_AMOUNT,PIE_UNT_CODE,PIE_HST_UNIT_PRICE, PIE_HST_TOTAL_QTY,PIE_HST_TOTAL_BILLED_QTY,PIE_HST_ALLOW_TO_BILL_QTY,PIE_HST_PRCT_OF_COMPLETION,PIE_HST_QTY_COMPLETED, PIE_PWR_ID,PIE_DISCOUNT,PIE_DOWN_PAYMENT_RECOVERY,PIE_BOQ_DISCOUNT,PIE_BOQ_DOWN_PAYMENT,PIE_UNT_PRICE_BFR_DISCOUNT, PIE_TOTAL_PRICE_BFR_DISCOUNT ) VALUES ( :old.PIE_PIN_ID,old.PIE_TDT_ID,old.PIE_ID,old.PIE_QTY_EXECUTED,old.PIE_UNIT_PRICE,old.PIE_NET_PRICE,old.PIE_INVOICED_AMOUNT,old.PIE_UNT_CODE,old.PIE_HST_UNIT_PRICE, old.PIE_HST_TOTAL_QTY,old.PIE_HST_TOTAL_BILLED_QTY,old.PIE_HST_ALLOW_TO_BILL_QTY,old.PIE_HST_PRCT_OF_COMPLETION,old.PIE_HST_QTY_COMPLETED, old.PIE_PWR_ID,old.PIE_DISCOUNT,old.PIE_DOWN_PAYMENT_RECOVERY,old.PIE_BOQ_DISCOUNT,old.PIE_BOQ_DOWN_PAYMENT,old.PIE_UNT_PRICE_BFR_DISCOUNT, old.PIE_TOTAL_PRICE_BFR_DISCOUNT, sysdate, v_username ); END; /

and it shows the compiling error!

Trigger INVOICE_BEFORE_DELETE compiled LINE/COL ERROR --------- ------------------------------------------------------------- 6/4 PL/SQL: SQL Statement ignored 6/16 PL/SQL: ORA-00913: too many values Errors: check compiler log help me to solve this issues.

1 reply

david_r
Celebrity
  • July 16, 2018

You have specified 22 field names in the INSERT statement, but given 24 values, so it's a SQL syntax error that needs to be fixed.

Generally speaking, if the error message contains an ORA-xxxxx code, it's almost never an FME issue.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings