By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,939 Members | 1,670 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,939 IT Pros & Developers. It's quick & easy.

Inserting Multple records in different table?

P: 1
I have attached my query. Please help me how to inserting one by one records with different tables.

From that query I have to passing 3 parameter values remaining values same.

Can you plz write the Java code with looping which I mentioned in attached file.

Here is the contents of the file:
Expand|Select|Wrap|Line Numbers
  1. declare
  2.  
  3.   tel1 number :=4152795147;
  4.  
  5.      begin
  6.  
  7.    for i in 1..2
  8.  
  9.    loop                                                                                                                                                                                                                                                                                                   
  10.  
  11. Insert into PRISM_AD.BOD_SVC_CAPABILITY (BOD_SVC_CAPABILITY_ID,SVC_CAP_ID,SERVICE_ID,BOD_SERVICES_ID,FEATURE_CODE,FEATURE_NAME,CAP_ACTION_CODE,CREATION_DATE,CAPABILITY_REF_ID,CAP_REF_TYPE,BOD_ACCESSORY_ID,CATALOG_REF_TIME) values (PRISM_AD.BOD_SVC_CAPABILITY_ID_SEQ.NEXTVAL,tel1,'483135479', 1938605,'EFET_VOIP_TN_LVL','TN Level','ADD',to_date('29-AUG-16','DD-MON-RR'),null,'SERVICES',null,to_timestamp('24-JUL-13 04.52.34.000000000 PM','DD-MON-RR HH.MI.SS.FF AM'));
  12.  
  13. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL,tel1,'1938605','SP_VOIP_TELE_NUM','Telephone Number',tel1,null,to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  14.  
  15. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','SP_VOIP_PORTED_INDICATOR','Ported Indicator','Yes','Y',to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  16.  
  17. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','ESP_VOIP_PS_ALI_FLAG','PS/ALI Indicator','Yes','Y',to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  18.  
  19. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','SP_VOIP_TN_DISPOSITION','TN Disposition','Porting','P',to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  20.  
  21. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','ESP_TSP_APPROVAL_CODE','TSPCode','T7026324385',null,to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  22.  
  23. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','ESP_Trunk_Info','Trunk Info','V9035',null,to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  24.  
  25. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','ESP_SWITCH_CLLI','Switch CLLI','WASHDCINDS0',null,to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  26.  
  27. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','ESP_CALLER_ID_FIRST_NAME','Caller ID with Name Outbound First Name','satnhi',null,to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  28.  
  29. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','ESP_CALLER_ID_LAST_NAME','Caller ID with Name Outbound Last Name','thabas',null,to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605  And SVC_CAP_ID=tel1),null,null,null,null);
  30.  
  31. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','ESP_TRANSITION_TYPE','Transition Type','R2R',null,to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  32.  
  33. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL, tel1,'1938605','ESP_FROM_LOCATION_ID','From Location Id','393163074',null,to_date('29-AUG-16','DD-MON-RR'),  1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID= 1938605 And SVC_CAP_ID=tel1),null,null,null,null);
  34.  
  35. Insert into PRISM_AD.BOD_SPECS (BOD_SPEC_ID,SVC_CAP_ID,SERVICE_ID,SPEC_CODE,SPEC_NAME,SPEC_VALUE,VALUE_CODE,CREATION_DATE,BOD_SERVICES_ID,BOD_SVC_CAPABILITY_ID,REF_INSTANCE_ID,BOD_ACCESSORY_ID,SPEC_GROUP_TYPE,SPEC_GROUP_INSTANCE_ID) values (PRISM_AD.BOD_SPEC_ID_SEQ.NEXTVAL,tel1 ,'1938605','ESP_TRUNK_GROUP_INSTANCE_ID','Trunk Group Instance ID','483135487',null,SYSDATE, 1938605,(SELECT BOD_SVC_CAPABILITY_ID FROM PRISM_AD.BOD_SVC_CAPABILITY WHERE BOD_SERVICES_ID=1938605 And SVC_CAP_ID=tel1),null,null,null,null);     -------? used this in case on NON TSO migration
  36.  
  37. Insert into WFCONTROLLER_AD.RV_TN_INFO (TN_INFO_ID,RV_ORDER_ID,TRUNK_GROUP_ID,TELEPHONE_NUM,PORTED_INDICATOR,TN_CLID_FIRST_NAME,TN_CLID_LAST_NAME,CREATION_TIME,LAST_UPDATE_TIME,CALL_FWD_UNREACH_IND,SHARED_TRUNK_GROUP,SWITCH_CLLI,ENTITY_ACTION_CODE,ESAP_TN_STATUS,IPRO_TN_STATUS,TN_DISPOSITION,FET_TN_INSTANCE_ID,TRUNK_GROUP_INSTANCE_ID,GAINING_CARRIER_PREFIX,LOSING_CARRIER_PREFIX,OWNER_CARRIER_PREFIX,NRM_TN_STATUS,TRANSITION_TYPE,GIS_FLAG,NRM_PORTING_IND,SUBSCRIBER_ID,NRM_SUBSTATUS,GATEWAY_NUMBER,PRODUCT_CATEGORY,COUNTRY_CODE_NUM,DEACT_STAT_IND,PS_ALI_FLAG,LOCATION_ID,VOIP_MAIN_TN,VERIZON_BTN,FROM_LOCATION_ID,RELATED_LOCAL_ORD_NUMBER,LOCAL_PROV_ORD_NUMBER,ESAP_CNAM_MILESTONE_SENT,LOCATION_EMPTY_FLAG,SERVICE_TYPE,REQUESTED_PORTED_IN_DUE_DATE,REQUESTED_PORTED_TIME,LEC_BTN,TN_LIDB_CODE,DOMESTIC_TF_TN,AREA_CODE,RIO,LOOSING_CARRIER_RIO) values(WFCONTROLLER_AD.TN_INFO_ID_SEQ.NEXTVAL,17172292,208853,tel1,'Yes',null,null,SYSDATE,SYSDATE,null,null,null,'ADD',null,null,'Porting',tel1,null,null,null,null,null,'R2R',null,null,null,null,null,null,null,null,null,null,'483135487',null,'393163074',null,null,null,null,null,null,null,null,null,null,null,null,null);
Attached Files
File Type: txt R2R Query Updation.txt (8.3 KB, 174 views)
Mar 28 '18 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.