The tables with respect to my problem are: Code (Text): CREATE TABLE "CUSTOMER" ( "CUST_ID" NUMBER, "CUST_NAME" VARCHAR2(50 BYTE), "CUST_PHONE" NUMBER(10,0) NOT NULL ENABLE, CONSTRAINT "CUSTOMER_PK" PRIMARY KEY ("CUST_ID") ) CREATE TABLE "CUSTOMER_ORDER" ( "ORDER_ID" NUMBER NOT NULL ENABLE, "CUST_ID" NUMBER, "ORDER_DATE" DATE DEFAULT (sysdate-1), CONSTRAINT "CO_PK" PRIMARY KEY ("ORDER_ID") CONSTRAINT "CO_FK" FOREIGN KEY ("CUST_ID") REFERENCES "CUSTOMER" ("CUST_ID") ENABLE ) CREATE TABLE "ORDER_LINE" ( "ORDER_ID" NUMBER, "PRODUCT_ID" NUMBER, "QUANTITY" NUMBER, "PRICE" NUMBER, "PROD_ALIAS" VARCHAR2(10 BYTE), CONSTRAINT "OL_PK" PRIMARY KEY ("ORDER_ID", "PRODUCT_ID") CONSTRAINT "OL_FK" FOREIGN KEY ("ORDER_ID") REFERENCES "HD"."CUSTOMER_ORDER" ("ORDER_ID") ENABLE, CONSTRAINT "OL_FK1" FOREIGN KEY ("PRODUCT_ID") REFERENCES "HD"."PRODUCT" ("PROD_CODE") ENABLE ) There are other tables as well but not related to the problem. There is a 'temp' in which data is loaded through sqlldr and then after insert trigger is calls the following procedure to add data into the tables: Code (Text): create or replace procedure allinone( p_cust_phone customer.cust_phone%type, p_address address.address%type, p_area address.area%type, p_ord_id customer_order.order_id%type ) is l_cust_id customer.cust_id%type; l_address_id address.address_id%type; begin begin select cust_id into l_cust_id from customer c where c.cust_phone=p_cust_phone; exception when no_data_found then insert into customer values (cust_id_seq.nextval, 'No Name', p_cust_phone) returning cust_id into l_cust_id; end; select address_id into l_address_id from address a where a.address=p_address; exception when no_data_found then insert into address values (address_id_seq.nextval, UPPER(p_address), UPPER(p_area)) returning address_id into l_address_id; insert into customer_address values (l_cust_id, l_address_id); insert into customer_order (order_id, cust_id) values (p_ord_id,l_cust_id); end; The trigger is : Code (Text): create or replace TRIGGER callproc_tg AFTER INSERT ON temp FOR EACH ROW BEGIN allinone(:new.phno, :new.addr, :new.area, :new.ord_id); END; The problem is that data in the CUSTOMER_ORDER table is not getting inserted as desired. Multiple values of order_id are not getting entered in the table. Example: If I have cust_id=1 placing 3 orders then only the first order is reflected in the CUSTOMER_ORDER table. The rest of the 2 orders are lost. What is the mistake I am making in the procedure? Unable to figure it out.