Request Forum inputs for Insert statements
Hi All,
I have a scenario as mentioned below and need your inputs to improve performance
Package Sample
Procedure A
Insert into Table A();
End Procedure A
Procedure B
Insert into Table B();
End Procedure B
Procedure C
Insert into Table C();
End Procedure C
End Package Sample
I assume that when I execute the above package completely, then first Procedure A starts to insert a million records followed by Procedure B and then C in a sequence.
Is there any way through which while procedure A is executing, I need to parallely run the Procedure B and similarly Procedure C...
Please advice on best way to achieve performance in the above mentioned scenario.....Thanks
Harinath Arasu wrote:
I assume that when I execute the above package completely, then first Procedure A starts to insert a million records followed by Procedure B and then C in a sequence.Wrong assumption. You don't execute packages. Packages are just collections of procedures/functions etc. that you call individually as you need. A package can have it's own execution section (BEGIN .... ) just before the END of the package, and that will execute once only, the first time the package is accessed for any one session (or if the package is invalidated and recompiled).
Is there any way through which while procedure A is executing, I need to parallely run the Procedure B and similarly Procedure C...You need to use the DBMS_SCHEDULER package to schedule seperate jobs to run at the same time to call each of the procedures individually.
Please advice on best way to achieve performance in the above mentioned scenario.....ThanksIf it's a performance issue, it's likely not just about getting them to run at the same time, but about what it's actually doing. So first you need to identify the cause of the performance issue.
e.g. are your inserts all being doing in cursor loops? Or millions of insert statements? This is notoriously slow.
Also read the threads pointed to by the following post:
{message:id=9360003}
Similar Messages
-
TAF creation for insert statement
Hi,
I created a TAF service for select statement but,
I have a problem in creating a TAF service for INSERT statement.
Can any one say how to create TAF for inserting?
Hope i'll get my answer ASAP.
Regards,
Suri.Hi,
DML is not supported by TAF. The application code must be prepared for these failures events.
Regards,
Rodrigo Mufalani
http;//mufalani.blogspot.com -
Nologging for insert statement
Hello,
Is it possible to use NOLOGGING with INSERT statement?
For example:
INSERT /*+ APPEND PARALLEL(test,4)*/INTO test NOLOGGING (select .....)
It will take NOLOGGING as alias name of table or what is correct way to use NOLOGGING for insert statement.There is no such thing as a NOLOGGING hint (or insert keyword as you've tried it).
You must use ALTER TABLE table_name NOLOGGING; -
Raise Exception for Insert Statement
Hello All,
Hope everyone know that when we try to do an Insert on a table in two different session with the same unique key then in the second session the application will hang.
Instead of hanging or waiting in another session, do we have any option to raise an Exception saying "Parallel Duplicate insertion is active." or to do Insert with NOWAIT so that it throws an Error.
Thanks in advance.
Regards,
YathishAs far as I know, you cannot do this for inserts. It makes sense when you think about it a bit. User 1 inserts a row into the table but does not commit. That row only potentially exists in the database. User 2 comes along and tries to insert the same row. Oracle sees that this row potentially exists, so makes user 2 wait to see what user 1 does. If user 1 commits, user 2 will get a constraint violation, if user 1 does a rollback, then user 2 gets to insert their version of the row.
The only thing you can do is to catche the exception and then do whatever makes sense form a business perspective.
I have several cases where I use this kind of logic. I get messages coming in from several differrnt source systems. I potentially need to create records in a number of different tables. In some cases, while one session is processing a message, another session will process a different message that creates one of the objects that session 1 thinks it will need to. When session 1 gets the constraint violoation it either retrieves the newly created surrogate key for further use (i.e. in other child tables), or updates the newly created record with the data it hase, depending on the business rules in force.
John -
What's the syntax for Insert statement in Servlet?
I'm trying to insert record into table using servlet. Can you please show me the statement and syntax of how to use it?
hi
we can insert in 2 types
1) to all column insert
insert into <tablename> values ( 1,2,3,4...n);
2) particular column insert
insert into <tablename> ( col1,col2,col3...n) values ( value1 for col1, 2 , 3...n);
ex:
PreparedStatement ps = con.prepareStatement ( "insert into billtable (grandtotal,userid,creditno)values( ?,?,? )" );
//bill table
ps.setDouble ( 1, 10.50); //replace this double value with double variable
ps.setString ( 2, "vijay");
ps.setLong ( 3, 1111111111);
ps.executeUpdate ();
ps.clearParameters ();
ps.close ();More Details refer java with Jdbc concepts -
Invalid payload for insert statement of a DB adapter
Hi,
I am back again with another issue :-(
I have build a BPEL process which is reading data from a flat file (fixed fieldlength) using the ftp adapter. Next I pass this data to an ESB service, which will do some work on the data (including a normalize-space) and should finally write it to the DB. Unfortunately the insert fails due to empty elements in the xml.
<top:TblScprl4VorgangCollection xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/WriteOrderVorgang2Interface">
<top:TblScprl4Vorgang>
<top:sidKomm>71540000021754168</top:sidKomm>
<top:atlasversionsnummer>E.2.0</top:atlasversionsnummer>
<top:anmeldeart>ESV</top:anmeldeart>
<top:beladeort/>
<top:anzContainerGesamt/>
<top:vorpapierNr/>
<top:vorpapierart>OHNE</top:vorpapierart>
</top:TblScprl4Vorgang>
</top:TblScprl4VorgangCollection>I must admit that these elements are a result of the fixed fieldlength and using normalize-space, but why is the DB adapter unable to handle these empty elements? It's driving me nuts! Especially because using the DB adapter in a BPEL process has no problem to write such data :-(
For the reason of performance I wanted to give the ESB a try. Now I'm stuck.
Could this be a bug in SOA Suite 10.1.3.3.0? Are there any workarounds?
Any ideas welcome.
Regards
MarcoHi all,
just another update.
I found out that using *<xsl:if test="string-length(...) > 0">* in the mapper file of the ESB process' routing rule, it filters out the empty elements. So although this will do as a workaround, I am wondering if this is the only possibility to get a valid payload. (I can't wait for the first performance test ;-) )
So, if someone is able to come up with a better solution, please let me know!
Kind regards,
Marco -
hi,
i have used script for insert statement.while compiling it ,it shows error in declare section that to in t24_customer_code.can any body pls check out and tell me.
the script is ....
DECLARE
a NUMBER := 10;
t24_customer_code NUMBER;
my_tab SYS.dbms_debug_vc2coll := SYS.dbms_debug_vc2coll ();
BEGIN
LOOP
EXIT WHEN a > 20;
a := a + 1;
t24_customer_code:= 9700 + a;
INSERT INTO t24_customer
(t24_customer_code,
T24_MNEMONIC,
T24_SHORT_NAME,
T24_NAME_1,
T24_NAME_2,
T24_STREET,
T24_SECTOR,
T24_ACCOUNT_OFFICER,
T24_OTHER_OFFICER,
T24_INDUSTRY,
T24_TARGET,
T24_NATIONALITY,
T24_CUSTOMER_STATUS,
T24_LANGUAGE)
VALUES
(t24_customer_code,
'MNEMON' || a,
'HANSARUN',
'KUMAR',
'MAQSOOD',
'NIYAZ DINESH',
1001,
1,
5,
1000,
1,
'US',
2,
'US');
my_tab.EXTEND;
my_tab (a - 1) := t24_customer_code;
END LOOP;
OPEN :cur FOR
SELECT *
FROM t24_customer
WHERE t24_customer_code IN (SELECT COLUMN_VALUE
FROM TABLE (CAST (my_tab AS SYS.dbms_debug_vc2coll)));
END;
thanks
ratheeshPlease describe column name and data type on your table.
T24_MNEMONIC is not NUMBER, is it?
By the way,
VALUES
(t24_customer_code,Here t24_customer_code is not your variable
but that is column name of t24_customer.
You might get another error after solving 'ORA-01722: invalid number'
SQL> edit
Wrote file afiedt.buf
1* insert into scott.dept (deptno) values (deptno)
SQL> /
insert into scott.dept (deptno) values (deptno)
ERROR at line 1:
ORA-00984: column not allowed here -
Insert statement taking more time
Hi,
Insert happening very slow after sqlldr happening in my program. Please find the below workflow of my program.
1) SQLLDR will be called, it will insert around 4 lakhs records in 'TEMP" table using direct path load.Response time is good here.
2)After, SQLLDR has finished its job, my procedure will be called, there every cursor statement working fine, but when it comes for "INSERT" statement it takes almost 40 mins.
3)Insert statement like this
INSERT /*+ append */ INTO HISTORY_TABLE(<COLUMN1>,<COLUMN2>,..etc) SELECT (<COLUMN1>,.<COLUMN2>...etc) from TEMP_TABLE;
4)select records from temp table which records were inserted during sqlldr(direct=true),before procedure call.
5)I check explain plan for the Insert statement it shows conventional path loading
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
| 0 | INSERT STATEMENT | | 409K| 143M| 6752 (2)|
| 1 | LOAD AS SELECT | HISTORY_TABLE | | | |
| 2 | TABLE ACCESS FULL | TEMP_TABLE | 409K| 143M| 6752 (2)|
6)Since i have no where condition in my insert statement it go for an full table scan.
Kindly advice to impove its performance.
My db is oracle 11g r2(11.2.0.3.0)
OS-Windows server 2008 r2
Tkprof for the sesion:
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 98.10 1860.58 347770 74736 1711253 407077
Fetch 0 0.00 0.00 0 0 0 0
total 1 98.10 1860.58 347770 74736 1711253 407077
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 84 (recursive depth: 1)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 256304 6.61 1299.01
direct path read temp 273 3.47 14.99
log buffer space 22 0.75 3.84
log file switch completion 7 19.48 30.70
log file switch (checkpoint incomplete) 16 8.12 17.15
db file parallel read 2 0.07 0.09
log file switch (private strand flush incomplete)
3 0.32 0.74
buffer busy waits 4 0.00 0.00
undo segment extension 2 0.00 0.00
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.2.0.3
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 128
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL>
SQL> l
1 select
2* sname,pname,pval1,pval2 from sys.aux_stats$
SQL> /
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 11-03-2011 06:38
SYSSTATS_INFO DSTOP 11-03-2011 06:38
SYSSTATS_INFO FLAGS 1
SYSSTATS_MAIN CPUSPEEDNW 1720.20725
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED
SYSSTATS_MAIN MBRC
SNAME PNAME PVAL1 PVAL2
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
Thanks
FaizHi,
Below i apend the both table definitions. Please check
CREATE TABLE HISTORY_TABLE
( DAT_TIM VARCHAR2(19 BYTE),
REC_TYP VARCHAR2(2 BYTE),
AUTH_PPD VARCHAR2(4 BYTE),
LN_TERM VARCHAR2(4 BYTE),
FIID_TERM VARCHAR2(4 BYTE),
TERM_ID VARCHAR2(16 BYTE),
LN_ISSUER VARCHAR2(4 BYTE),
FIID_ISSUER VARCHAR2(20 BYTE),
PAN VARCHAR2(19 BYTE),
MBR_NUM VARCHAR2(3 BYTE),
BRCH_ID VARCHAR2(4 BYTE),
REGN_ID VARCHAR2(4 BYTE),
USER_FLD1X VARCHAR2(2 BYTE),
TYP_CDE VARCHAR2(2 BYTE),
TYP VARCHAR2(4 BYTE),
RTE_STAT VARCHAR2(2 BYTE),
ORIGINATOR CHAR(1 BYTE),
RESPONDER CHAR(1 BYTE),
ENTRY_TIM VARCHAR2(19 BYTE),
EXIT_TIM VARCHAR2(19 BYTE),
RE_ENTRY_TIM VARCHAR2(19 BYTE),
TRAN_DAT VARCHAR2(6 BYTE),
TRAN_TIM VARCHAR2(8 BYTE),
POST_DAT VARCHAR2(6 BYTE),
ACQ_ICHG_SETL_DAT VARCHAR2(6 BYTE),
ISS_ICHG_SETL_DAT VARCHAR2(6 BYTE),
SEQ_NUM VARCHAR2(12 BYTE),
TERM_TYP VARCHAR2(2 BYTE),
TIM_OFST VARCHAR2(5 BYTE),
ACQ_INST_ID_NUM VARCHAR2(11 BYTE),
RCV_INST_ID_NUM VARCHAR2(11 BYTE),
T_CDE VARCHAR2(2 BYTE),
T_FROM VARCHAR2(2 BYTE),
T_TO VARCHAR2(2 BYTE),
FROM_ACCT VARCHAR2(24 BYTE),
USER_FLD1 VARCHAR2(1 BYTE),
TO_ACCT VARCHAR2(19 BYTE),
MULT_ACCT VARCHAR2(1 BYTE),
AMT1 VARCHAR2(19 BYTE),
AMT2 VARCHAR2(19 BYTE),
AMT3 VARCHAR2(19 BYTE),
DEP_BAL_CR VARCHAR2(10 BYTE),
DEP_TYP VARCHAR2(1 BYTE),
RESP_BYTE1 VARCHAR2(3 BYTE),
RESP_BYTE2 VARCHAR2(3 BYTE),
TERM_NAME_LOC VARCHAR2(25 BYTE),
TERM_OWNER_NAME VARCHAR2(40 BYTE),
TERM_CITY VARCHAR2(13 BYTE),
TERM_ST_X VARCHAR2(3 BYTE),
TERM_CNTRY_X VARCHAR2(2 BYTE),
OSEQ_NUM VARCHAR2(12 BYTE),
OTRAN_DAT VARCHAR2(4 BYTE),
OTRAN_TIM VARCHAR2(8 BYTE),
B24_POST_DAT VARCHAR2(4 BYTE),
ORIG_CRNCY_CDE VARCHAR2(3 BYTE),
AUTH_CRNCY_CDE VARCHAR2(3 BYTE),
AUTH_CONV_RATE VARCHAR2(8 BYTE),
SETL_CRNCY_CDE VARCHAR2(3 BYTE),
SETL_CONV_RATE VARCHAR2(8 BYTE),
CONV_DAT_TIM VARCHAR2(19 BYTE),
RVSL_RSN VARCHAR2(2 BYTE),
PIN_OFST VARCHAR2(16 BYTE),
SHRG_GRP VARCHAR2(1 BYTE),
DEST_ORDER VARCHAR2(1 BYTE),
AUTH_ID_RESP VARCHAR2(6 BYTE),
IMP_IND VARCHAR2(1 BYTE),
AVAIL_IMP VARCHAR2(2 BYTE),
LEDG_IMP VARCHAR2(2 BYTE),
HLD_AMT_IMP VARCHAR2(2 BYTE),
CAF_REFR_IND VARCHAR2(1 BYTE),
USER_FLD3 VARCHAR2(1 BYTE),
DEP_SETL_IMP_FLG VARCHAR2(1 BYTE),
ADJ_SETL_IMP_FLG VARCHAR2(1 BYTE),
PBF1 VARCHAR2(1 BYTE),
PBF2 VARCHAR2(1 BYTE),
PBF3 VARCHAR2(1 BYTE),
PBF4 VARCHAR2(1 BYTE),
USER_FLD4 VARCHAR2(16 BYTE),
FRWD_INST_ID_NUM VARCHAR2(11 BYTE),
CRD_ACCPT_ID_NUM VARCHAR2(40 BYTE),
CRD_ISS_ID_NUM VARCHAR2(11 BYTE),
USER_FLD6 VARCHAR2(1 BYTE),
FILE_NAME VARCHAR2(100 BYTE),
ERR_FLAG CHAR(1 BYTE),
AMT2_ACTUAL VARCHAR2(20 BYTE),
ID_COL NUMBER(23,0),
RVSL_FLAG CHAR(1 BYTE),
SWRE_ID VARCHAR2(20 BYTE),
GAC_ID VARCHAR2(20 BYTE),
INS_USER NUMBER(5,0),
PART_CODE NUMBER(3,0),
ISS_RECON NUMBER(1,0),
ACQ_RECON NUMBER(1,0),
CROSS_BRANCH CHAR(1 BYTE),
CONSORTIUM_CODE NUMBER(3,0),
FROM_HOST VARCHAR2(1 BYTE),
FROM_HOST_ACQ VARCHAR2(1 BYTE),
AUDIT_NUM VARCHAR2(12 BYTE),
CAPTURE_CODE VARCHAR2(1 BYTE),
RESP_DAT_TIME VARCHAR2(19 BYTE),
PAN_SEQ_NUM NUMBER(1,0),
SERVICE_CODE VARCHAR2(3 BYTE),
ISS_BIN VARCHAR2(6 BYTE),
POS_DATA VARCHAR2(12 BYTE),
SECURITY_DATA VARCHAR2(8 BYTE),
CASHBACK_AMT VARCHAR2(15 BYTE),
REPLACEMENT_AMOUNT VARCHAR2(15 BYTE),
SETTL_AMT VARCHAR2(16 BYTE),
TRAN_FEE VARCHAR2(15 BYTE),
SETL_FEE VARCHAR2(15 BYTE),
MERC_CODE VARCHAR2(4 BYTE),
NTWORK_DATA VARCHAR2(12 BYTE),
PRIVATE_DATA_C_100 VARCHAR2(100 BYTE),
PAYMENT_INFO VARCHAR2(50 BYTE),
SURCHARGE_FEE VARCHAR2(15 BYTE),
SURC_BILL_AMT VARCHAR2(19 BYTE),
PROCESSING_CODE VARCHAR2(7 BYTE),
FRWD_CNTRY_CODE VARCHAR2(3 BYTE),
NTWORK_CODE VARCHAR2(2 BYTE),
FUNCTION_CODE VARCHAR2(3 BYTE),
REASON_CODE VARCHAR2(4 BYTE),
FEES VARCHAR2(10 BYTE),
SUR_CHARGE VARCHAR2(10 BYTE),
MESSAGE_TYPE VARCHAR2(4 BYTE),
APPROVE_STATUS VARCHAR2(10 BYTE),
CPS_TRAN_ID VARCHAR2(20 BYTE),
BANKTYPE_CODE VARCHAR2(5 BYTE),
RRB_BIN_CODE VARCHAR2(7 BYTE),
T_TYPE VARCHAR2(5 BYTE),
FEE_CRNCY VARCHAR2(25 BYTE),
FEE_INDICATOR VARCHAR2(1 BYTE),
FEE_TYPE VARCHAR2(84 BYTE),
CREDIT_BANK_CODE VARCHAR2(11 BYTE),
CREDIT_BR_CODE VARCHAR2(8 BYTE),
DEBIT_BANK_CODE VARCHAR2(11 BYTE),
ACTION_CODE VARCHAR2(3 BYTE),
ZEROS VARCHAR2(6 BYTE),
OTRACE_AUDIT_NO VARCHAR2(6 BYTE),
OFEE_TYPE1 VARCHAR2(2 BYTE),
OFEE_CRNCY1 VARCHAR2(3 BYTE),
OFEE_AMNT VARCHAR2(16 BYTE),
OFEE_INDICATOR VARCHAR2(1 BYTE),
SPACES VARCHAR2(2 BYTE),
ACQ_BANK_CODE VARCHAR2(6 BYTE),
CASHAT_POS VARCHAR2(16 BYTE),
LTS_STATUS VARCHAR2(30 BYTE),
APP_CODE VARCHAR2(6 BYTE),
CARD_ACCEPTID VARCHAR2(15 BYTE),
RESPONSE_CODE VARCHAR2(15 BYTE),
RES_RECVD_HOST VARCHAR2(1 BYTE),
DEVICE_ID VARCHAR2(16 BYTE),
RECORD_TYPE VARCHAR2(1 BYTE),
RRT_DEBIT_BANK_CODE VARCHAR2(11 BYTE),
ORIG_TYP VARCHAR2(6 BYTE),
DEVICE_TYPE VARCHAR2(3 BYTE),
ORGTRAN_CODE VARCHAR2(4 BYTE),
BILL_CRNCY VARCHAR2(3 BYTE),
BILL_AMNT VARCHAR2(19 BYTE),
OTRAN_AMNT VARCHAR2(19 BYTE),
INS_DATE DATE,
RECON_FLAG VARCHAR2(2 BYTE),
TRAN_ID VARCHAR2(25 BYTE)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX ON HISTORY_TABLE (TYP, DEVICE_ID, FROM_ACCT, AMT1, NTWORK_CODE, ISS_BIN, POST_DAT, RESP_BYTE1, DEVICE_TYPE, T_CDE, PRIVATE_DATA_C_100, REASON_CODE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX1 ON HISTORY_TABLE (TO_NUMBER(AMT1))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX_FN ON HISTORY_TABLE (SUBSTR(DEVICE_ID,4))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX_IDX ON HISTORY_TABLE (T_CDE, PRIVATE_DATA_C_100, ISS_BIN)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX_TST ON HISTORY_TABLE (TYP, POST_DAT, RESP_BYTE1, DEVICE_TYPE, AMT1)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_ALL_SWT_DATA_INDEX_TST1 ON HISTORY_TABLE (DEVICE_TYPE, TO_NUMBER(AMT1))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IDX_ALLSWT_PAN ON HISTORY_TABLE (PAN)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
Table Definition for TEMP Table:
CREATE TABLE REC_TLF_TEMP
( DAT_TIM VARCHAR2(19 BYTE),
REC_TYP VARCHAR2(2 BYTE),
AUTH_PPD VARCHAR2(4 BYTE),
LN_TERM VARCHAR2(4 BYTE),
FIID_TERM VARCHAR2(4 BYTE),
TERM_ID VARCHAR2(16 BYTE),
LN_ISSUER VARCHAR2(4 BYTE),
FIID_ISSUER VARCHAR2(20 BYTE),
PAN VARCHAR2(19 BYTE),
MBR_NUM VARCHAR2(3 BYTE),
BRCH_ID VARCHAR2(4 BYTE),
REGN_ID VARCHAR2(4 BYTE),
USER_FLD1X VARCHAR2(2 BYTE),
TYP_CDE VARCHAR2(2 BYTE),
TYP VARCHAR2(4 BYTE),
RTE_STAT VARCHAR2(2 BYTE),
ORIGINATOR CHAR(1 BYTE),
RESPONDER CHAR(1 BYTE),
ENTRY_TIM VARCHAR2(19 BYTE),
EXIT_TIM VARCHAR2(19 BYTE),
RE_ENTRY_TIM VARCHAR2(19 BYTE),
TRAN_DAT VARCHAR2(6 BYTE),
TRAN_TIM VARCHAR2(8 BYTE),
POST_DAT VARCHAR2(6 BYTE),
ACQ_ICHG_SETL_DAT VARCHAR2(6 BYTE),
ISS_ICHG_SETL_DAT VARCHAR2(6 BYTE),
SEQ_NUM VARCHAR2(12 BYTE),
TERM_TYP VARCHAR2(2 BYTE),
TIM_OFST VARCHAR2(5 BYTE),
ACQ_INST_ID_NUM VARCHAR2(11 BYTE),
RCV_INST_ID_NUM VARCHAR2(11 BYTE),
T_CDE VARCHAR2(2 BYTE),
T_FROM VARCHAR2(2 BYTE),
T_TO VARCHAR2(2 BYTE),
FROM_ACCT VARCHAR2(24 BYTE),
USER_FLD1 VARCHAR2(1 BYTE),
TO_ACCT VARCHAR2(19 BYTE),
MULT_ACCT VARCHAR2(1 BYTE),
AMT1 VARCHAR2(19 BYTE),
AMT2 VARCHAR2(19 BYTE),
AMT3 VARCHAR2(19 BYTE),
DEP_BAL_CR VARCHAR2(10 BYTE),
DEP_TYP VARCHAR2(1 BYTE),
RESP_BYTE1 VARCHAR2(3 BYTE),
RESP_BYTE2 VARCHAR2(3 BYTE),
TERM_NAME_LOC VARCHAR2(25 BYTE),
TERM_OWNER_NAME VARCHAR2(40 BYTE),
TERM_CITY VARCHAR2(13 BYTE),
TERM_ST_X VARCHAR2(3 BYTE),
TERM_CNTRY_X VARCHAR2(2 BYTE),
OSEQ_NUM VARCHAR2(12 BYTE),
OTRAN_DAT VARCHAR2(4 BYTE),
OTRAN_TIM VARCHAR2(8 BYTE),
B24_POST_DAT VARCHAR2(4 BYTE),
ORIG_CRNCY_CDE VARCHAR2(3 BYTE),
AUTH_CRNCY_CDE VARCHAR2(3 BYTE),
AUTH_CONV_RATE VARCHAR2(8 BYTE),
SETL_CRNCY_CDE VARCHAR2(3 BYTE),
SETL_CONV_RATE VARCHAR2(8 BYTE),
CONV_DAT_TIM VARCHAR2(19 BYTE),
RVSL_RSN VARCHAR2(2 BYTE),
PIN_OFST VARCHAR2(16 BYTE),
SHRG_GRP VARCHAR2(1 BYTE),
DEST_ORDER VARCHAR2(1 BYTE),
AUTH_ID_RESP VARCHAR2(6 BYTE),
IMP_IND VARCHAR2(1 BYTE),
AVAIL_IMP VARCHAR2(2 BYTE),
LEDG_IMP VARCHAR2(2 BYTE),
HLD_AMT_IMP VARCHAR2(2 BYTE),
CAF_REFR_IND VARCHAR2(1 BYTE),
USER_FLD3 VARCHAR2(1 BYTE),
DEP_SETL_IMP_FLG VARCHAR2(1 BYTE),
ADJ_SETL_IMP_FLG VARCHAR2(1 BYTE),
PBF1 VARCHAR2(1 BYTE),
PBF2 VARCHAR2(1 BYTE),
PBF3 VARCHAR2(1 BYTE),
PBF4 VARCHAR2(1 BYTE),
USER_FLD4 VARCHAR2(16 BYTE),
FRWD_INST_ID_NUM VARCHAR2(11 BYTE),
CRD_ACCPT_ID_NUM VARCHAR2(40 BYTE),
CRD_ISS_ID_NUM VARCHAR2(11 BYTE),
USER_FLD6 VARCHAR2(1 BYTE),
FILE_NAME VARCHAR2(100 BYTE),
ERR_FLAG CHAR(1 BYTE),
AMT2_ACTUAL VARCHAR2(20 BYTE),
ID_COL NUMBER(23,0),
RVSL_FLAG CHAR(1 BYTE),
SWRE_ID VARCHAR2(20 BYTE),
GAC_ID VARCHAR2(20 BYTE),
INS_USER NUMBER(5,0),
PART_CODE NUMBER(3,0),
ISS_RECON NUMBER(1,0),
ACQ_RECON NUMBER(1,0),
CROSS_BRANCH CHAR(1 BYTE),
CONSORTIUM_CODE NUMBER(3,0),
FROM_HOST VARCHAR2(1 BYTE),
FROM_HOST_ACQ VARCHAR2(1 BYTE),
AUDIT_NUM VARCHAR2(12 BYTE),
CAPTURE_CODE VARCHAR2(1 BYTE),
RESP_DAT_TIME VARCHAR2(19 BYTE),
PAN_SEQ_NUM NUMBER(1,0),
SERVICE_CODE VARCHAR2(3 BYTE),
ISS_BIN VARCHAR2(6 BYTE),
POS_DATA VARCHAR2(12 BYTE),
SECURITY_DATA VARCHAR2(8 BYTE),
CASHBACK_AMT VARCHAR2(15 BYTE),
REPLACEMENT_AMOUNT VARCHAR2(15 BYTE),
SETTL_AMT VARCHAR2(16 BYTE),
TRAN_FEE VARCHAR2(15 BYTE),
SETL_FEE VARCHAR2(15 BYTE),
MERC_CODE VARCHAR2(4 BYTE),
NTWORK_DATA VARCHAR2(12 BYTE),
PRIVATE_DATA_C_100 VARCHAR2(100 BYTE),
PAYMENT_INFO VARCHAR2(50 BYTE),
SURCHARGE_FEE VARCHAR2(15 BYTE),
SURC_BILL_AMT VARCHAR2(19 BYTE),
PROCESSING_CODE VARCHAR2(7 BYTE),
FRWD_CNTRY_CODE VARCHAR2(3 BYTE),
NTWORK_CODE VARCHAR2(2 BYTE),
FUNCTION_CODE VARCHAR2(3 BYTE),
REASON_CODE VARCHAR2(4 BYTE),
FEES VARCHAR2(10 BYTE),
SUR_CHARGE VARCHAR2(10 BYTE),
MESSAGE_TYPE VARCHAR2(4 BYTE),
APPROVE_STATUS VARCHAR2(10 BYTE),
CPS_TRAN_ID VARCHAR2(20 BYTE),
BANKTYPE_CODE VARCHAR2(5 BYTE),
RRB_BIN_CODE VARCHAR2(7 BYTE),
T_TYPE VARCHAR2(5 BYTE),
FEE_CRNCY VARCHAR2(25 BYTE),
FEE_INDICATOR VARCHAR2(1 BYTE),
FEE_TYPE VARCHAR2(84 BYTE),
CREDIT_BANK_CODE VARCHAR2(11 BYTE),
CREDIT_BR_CODE VARCHAR2(8 BYTE),
DEBIT_BANK_CODE VARCHAR2(11 BYTE),
ACTION_CODE VARCHAR2(3 BYTE),
ZEROS VARCHAR2(6 BYTE),
OTRACE_AUDIT_NO VARCHAR2(6 BYTE),
OFEE_TYPE1 VARCHAR2(2 BYTE),
OFEE_CRNCY1 VARCHAR2(3 BYTE),
OFEE_AMNT VARCHAR2(16 BYTE),
OFEE_INDICATOR VARCHAR2(1 BYTE),
SPACES VARCHAR2(2 BYTE),
ACQ_BANK_CODE VARCHAR2(6 BYTE),
CASHAT_POS VARCHAR2(16 BYTE),
LTS_STATUS VARCHAR2(30 BYTE),
APP_CODE VARCHAR2(6 BYTE),
CARD_ACCEPTID VARCHAR2(15 BYTE),
RESPONSE_CODE VARCHAR2(15 BYTE),
RES_RECVD_HOST VARCHAR2(1 BYTE),
DEVICE_ID VARCHAR2(16 BYTE),
RECORD_TYPE VARCHAR2(1 BYTE),
RRT_DEBIT_BANK_CODE VARCHAR2(11 BYTE),
ORIG_TYP VARCHAR2(6 BYTE),
DEVICE_TYPE VARCHAR2(3 BYTE),
ORGTRAN_CODE VARCHAR2(4 BYTE),
BILL_CRNCY VARCHAR2(3 BYTE),
TRAN_ID VARCHAR2(25 BYTE),
RECON_FLAG VARCHAR2(2 BYTE),
BILL_AMNT VARCHAR2(19 BYTE),
OTRAN_AMNT VARCHAR2(19 BYTE),
INS_DATE DATE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX CMS_TLF_TEMP_INDEX3 ON REC_TLF_TEMP (TO_NUMBER(PAN))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX CMS_TLF_TEMP_INDEX4 ON REC_TLF_TEMP (TO_NUMBER(AUDIT_NUM))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IDX_REC_TEMP_CDE ON REC_TLF_TEMP (T_CDE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX IDX_TLF_DEVICEID ON REC_TLF_TEMP (DEVICE_ID)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IDX_TLF_PRIVATE ON REC_TLF_TEMP (PRIVATE_DATA_C_100)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX IDX_TLF_TEMP_BYTE1 ON REC_TLF_TEMP (PRIVATE_DATA_C_100, ISS_BIN, NTWORK_CODE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_TST ;
CREATE INDEX IDX_TLF_TEMP_TST ON REC_TLF_TEMP (RESP_BYTE1)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IND_TLFTEMP_RVSLFLG ON REC_TLF_TEMP (RVSL_FLAG)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IND_TLFTEMP_TRMID_TCD ON REC_TLF_TEMP (TERM_ID, T_CDE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX IND_TLFTMP_NWCDE ON REC_TLF_TEMP (NTWORK_CODE)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX REC_TLF_TEMP_INDEX ON REC_TLF_TEMP (PAN, SEQ_NUM, AUDIT_NUM)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
CREATE INDEX TEMPREVLSET ON REC_TLF_TEMP (SEQ_NUM, TYP, REC_TYP, PAN)
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE TBS_IDX ;
It shows that no triggers for both the tables.
Confirm that no where condition being used in the SQL.
Thanks
Faiz -
Issu for running insert statement in oracle procedure.
Hi expert,
I ran a oracle procedure with a insert statement inside as:
insert into table1 select....
but I got error message related to this insert statement as "SQLERRM= ORA-08103: object no longer exists"
I ran this statement separately in toad, no error message, but no data result from this execute.
please tell how to fix this issue.
Many Thanks,
Edited by: 918440 on 27-Jun-2012 8:04 AMHi friend,
my insert statement is as follows:
INSERT INTO HIROC_RU_FACT_S
select
pp.policy_fk,
pp.transaction_log_fk,
p.policy_no,
p.policy_type_code,
hiroc_rpt_user.hiroc_get_entity_name(pp.policy_fk,'POLHOLDER') policy_holder,
pp.risk_fk,
r.risk_base_record_fk,
r.entity_fk,
hiroc_sel_entity_risk_name2 (pp.risk_fk,r.entity_fk) risk_name,
substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2) rating_state_code,
hiroc_get_province_name(substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2), 'PROVINCE_CODE', 'L') rating_state_name,
hiroc_get_provicne_pol_prefix(substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2),p.policy_type_code) rating_prov_pol_prefix,
nvl(r.risk_cls_used_to_rate,pth.peer_groups_code) rating_peer_group_code,
hiroc_get_lookup_desc('PEER_GROUP',nvl(r.risk_cls_used_to_rate,pth.peer_groups_code),'L') rating_peer_group_name,
pth.policy_term_history_pk,
pth.term_base_record_fk,
to_char(pth.effective_from_date,'yyyy') term_effective_year,
c.coverage_pk,
c.coverage_base_record_fk,
pc.coverage_code,
c.product_coverage_code,
pc.long_description,
pp.coverage_component_code,
c.effective_from_date,
c.effective_to_date,
cls.coverage_code coverage_class_code,
cls.coverage_long_desc coverage_class_long_desc,
decode(pp.coverage_component_code ,'GROSS',cls.exposure_unit,null) exposure_unit, --hiroc_get_expos_units_by_cov(c.coverage_pk,pc.coverage_code,c.effective_from_date,c.effective_to_date) exposure_unit,
decode(pp.coverage_component_code ,'GROSS',cls.number_of_patient_day,null) number_of_patient_day,
pth.effective_from_date term_eff_from_date,
pth.effective_to_date term_eff_to_date,
pp.premium_amount premium_amount,
(case when (pc.coverage_code in ('CP','MC1','MC2','MC3','MC4','HR','F') or pc.coverage_code like 'ST%') and
pp.coverage_component_code != 'RISKMGMT' then
(nvl(pp.premium_amount,0))
else
0
end) primary_premium,
(hiroc_get_risk_units(hiroc_get_provicne_pol_prefix(substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2),p.policy_type_code)-- rating_prov_pol_prefix
,nvl(r.risk_cls_used_to_rate,pth.peer_groups_code) -- rating_peer_group_code
,cls.coverage_code --coverage_class_code
,decode(pp.coverage_component_code ,'GROSS',cls.exposure_unit,null)
,pp.premium_amount
,(case when (pc.coverage_code in ('CP','MC1','MC2','MC3','MC4','HR','F') or pc.coverage_code like 'ST%') and
pp.coverage_component_code != 'RISKMGMT' then
(nvl(pp.premium_amount,0))
else
0
end) -- primary_premium
,p.policy_type_code
,trunc(pth.effective_to_date))) risk_units
from proddw_mart.rmv_territory_makeup tm,
proddw_mart.rmv_premium_class_makeup pcm,
proddw_mart.rmv_product_coverage pc,
proddw_mart.rmv_coverage c,
proddw_mart.rmv_risk r,
proddw_mart.rmv_policy_term_history pth,
proddw_mart.rmv_policy p,
proddw_mart.rmv_transaction_log tl,
proddw_mart.rmv_policy_premium pp,
(select /* +rule */
p.policy_no,
p.policy_start_date,
p.policy_end_date,
r.risk_pk,
r.risk_description,
c.coverage_pk,
c.parent_coverage_base_record_fk,
pc.parent_product_covg_code,
pc.coverage_code,
pc.short_description coverage_short_desc,
pc.long_description coverage_long_desc,
c.exposure_unit,
pc.exposure_basis_code,
c.number_of_patient_day,
p.policy_start_date policy_effective_date,
p.policy_end_date policy_expiry_date,
c.effective_from_date,
c.effective_to_date,
to_char(c.effective_from_date,'YYYY') class_eff_year
from proddw_mart.odwr_coverage_only c
,proddw_mart.odwr_product_coverage pc
,proddw_mart.odwr_risk r
,proddw_mart.odwr_policy p
where pc.code = c.product_coverage_code
and pc.parent_product_covg_code is not null -- coverage classes only
and r.risk_pk = c.risk_base_record_fk
and c.accounting_to_date = to_date('1/1/3000','mm/dd/yyyy') -- only open records
and c.base_record_b = 'N'
and p.base_record_b = 'N'
and p.policy_pk = r.policy_fk
and p.accounting_to_date = to_date('1/1/3000','mm/dd/yyyy') -- only open records
group by p.policy_no,
p.policy_start_date,
p.policy_end_date,
r.risk_pk,
r.risk_description,
c.coverage_pk,
c.parent_coverage_base_record_fk,
pc.parent_product_covg_code,
pc.coverage_code,
pc.short_description, -- coverage_short_desc,
pc.long_description, -- coverage_long_desc,
c.exposure_unit,
pc.exposure_basis_code,
c.number_of_patient_day,
p.policy_start_date, -- policy_effective_date,
p.policy_end_date, -- policy_expiry_date,
c.effective_from_date,
c.effective_to_date,
to_char(c.effective_from_date,'YYYY')-- class_eff_year
) cls
where tm.risk_type_code = r.risk_type_code
and tm.county_code = r.county_code_used_to_rate
and tm.effective_from_date <= pp.rate_period_from_date
and tm.effective_to_date > pp.rate_period_from_date
and pcm.practice_state_code (+) = r.practice_state_code
and pcm.risk_class_code (+) = r.risk_cls_used_to_rate
and nvl(pcm.effective_from_date, pp.rate_period_from_date) <= pp.rate_period_from_date
and nvl(pcm.effective_to_date, to_date('01/01/3000','mm/dd/yyyy')) > pp.rate_period_from_date
and pc.code = c.product_coverage_code
and c.base_record_b = 'N'
and ( c.record_mode_code = 'OFFICIAL'
and (c.closing_trans_log_fk is null or
c.closing_trans_log_fk != tl.transaction_log_pk)
or c.record_mode_code = 'TEMP'
and c.transaction_log_fk = tl.transaction_log_pk )
and c.parent_coverage_base_record_fk is null
and c.effective_from_date < c.effective_to_date
and c.effective_from_date <= pp.rate_period_from_date
and c.effective_to_date > pp.rate_period_from_date
and c.accounting_from_date <= tl.accounting_date
and c.accounting_to_date > tl.accounting_date
and c.coverage_base_record_fk=pp.coverage_fk
and r.base_record_b = 'N'
and ( r.record_mode_code = 'OFFICIAL'
and (r.closing_trans_log_fk is null or
r.closing_trans_log_fk != tl.transaction_log_pk)
or r.record_mode_code = 'TEMP'
and r.transaction_log_fk = tl.transaction_log_pk )
and r.effective_from_date < r.effective_to_date
and r.effective_from_date <= pp.rate_period_from_date
and r.effective_to_date > pp.rate_period_from_date
and r.accounting_from_date <= tl.accounting_date
and r.accounting_to_date > tl.accounting_date
and r.risk_base_record_fk = pp.risk_fk
and pth.base_record_b = 'N'
and ( pth.record_mode_code = 'OFFICIAL'
and (pth.closing_trans_log_fk is null or
pth.closing_trans_log_fk != tl.transaction_log_pk)
or pth.record_mode_code = 'TEMP'
and pth.transaction_log_fk = tl.transaction_log_pk )
and pth.accounting_from_date <= tl.accounting_date
and pth.accounting_to_date > tl.accounting_date
and pth.term_base_record_fk = pp.policy_term_fk
and p.policy_pk = pp.policy_fk
and tl.transaction_log_pk = pp.transaction_log_fk
and pp.active_premium_b = 'Y'
and pp.rate_period_type_code in ('CS_PERIOD','SR_PERIOD')
and pp.rate_period_to_date > pp.rate_period_from_date
and tl.accounting_date <= sysdate
and p.policy_cycle_code = 'POLICY'
and substr(p.policy_no,1,1) <> 'Q'
and tl.transaction_log_pk = (select max(pp.transaction_log_fk)
from proddw_mart.rmv_policy_premium pp,proddw_mart.rmv_transaction_log tl2
where pth.term_base_record_fk = pp.policy_term_fk
and pp.transaction_log_fk = tl2.transaction_log_pk
and tl2.accounting_date <= sysdate )
and p.policy_type_code in ('LIABCRIME','MIDWIFE')
and pth.accounting_to_date = to_date('01/01/3000','mm/dd/yyyy') --<<<******* eliminates duplicates
and p.policy_no = cls.policy_no
-- and r.risk_pk = cls.risk_pk
and c.coverage_base_record_fk = cls.parent_coverage_base_record_fk(+)
and cls.effective_from_date < pth.effective_to_date -- from date less than period end date
and cls.effective_to_date > pth.effective_from_date -- to date greater than period start date
and cls.policy_effective_date < pth.effective_to_date -- from date less than period end date
and cls.policy_expiry_date > pth.effective_from_date -- to date greater than period start date
group by pp.policy_fk,
pp.transaction_log_fk,
p.policy_no,
p.policy_type_code,
pp.risk_fk,
r.risk_base_record_fk,
r.entity_fk,
substr(trim(nvl(r.county_code_used_to_rate,pth.issue_state_code)),1,2), -- rating_state_code,
r.county_code_used_to_rate,
pth.issue_state_code,
nvl(r.risk_cls_used_to_rate,pth.peer_groups_code) , -- rating_peer_group_code,
r.risk_cls_used_to_rate,
pth.peer_groups_code,
pth.policy_term_history_pk,
pth.term_base_record_fk,
to_char(pth.effective_from_date,'yyyy'), --term_effective_year,
c.coverage_pk,
c.coverage_base_record_fk,
pc.coverage_code,
c.product_coverage_code,
pc.long_description,
pp.coverage_component_code,
c.effective_from_date,
c.effective_to_date,
cls.coverage_code, -- coverage_class_code,
cls.coverage_long_desc, -- coverage_class_long_desc,
decode(pp.coverage_component_code ,'GROSS',cls.exposure_unit,null),-- exposure_unit,
decode(pp.coverage_component_code ,'GROSS',cls.number_of_patient_day,null), -- number_of_patient_day,
pth.effective_from_date, --term_eff_from_date,
pth.effective_to_date, --, --term_eff_to_date,
pp.premium_amount ;Edited by: BluShadow on 27-Jun-2012 16:12
added {noformat}{noformat} tags for readability. PLEASE READ {message:id=9360002} AS PREVIOUSLY REQUESTED! & -
VLD-1119: Unable to generate Multi-table Insert statement for some or all t
Hi All -
I have a map in OWB 10.2.0.4 which is ending with following error: -
VLD-1119: Unable to generate Multi-table Insert statement for some or all targets.*
Multi-table insert statement cannot be generated for some or all of the targets due to upstream graphs of those targets are not identical on "active operators" such as "join".*
The map is created with following logic in mind. Let me know if you need more info. Any directions are highly appreciated and many thanks for your inputs in advance: -
I have two source tables say T1 and T2. There are full outer joined in a joiner and output of this joined is passed to an expression to evaluate values of columns based on
business logic i.e. If T1 is available than take T1.C1 else take T2.C1 so on.
A flag is also evaluated in the expression because these intermediate results needs to be joined to third source table say T3 with different condition.
Based on value taken a flag is being set in the expression which is used in a splitter to get results in three intermediate tables based on flag value evaluated earlier.
These three intermediate tables are all truncate insert and these are unioned to fill a final target table.
Visually it is something like this: -
T1 -- T3 -- JOINER1
| -->Join1 (FULL OUTER) --> Expression -->SPLITTER -- JOINER2 UNION --> Target Table
| JOINER3
T2 --
Please suggest.I verified that their is a limitation with the splitter operator which will not let you generate a multi split having more than 999 columns in all.
I had to use two separate splitters to achieve what I was trying to do.
So the situation is now: -
Siource -> Split -> Split 1 -> Insert into table -> Union1---------Final tableA
Siource -> Split -> Split 2 -> Insert into table -> Union1 -
Exception handling for all the insert statements in the proc
CREATE PROCEDURE TEST (
@IncrStartDate DATE
,@IncrEndDate DATE
,@SourceRowCount INT OUTPUT
,@TargetRowCount INT OUTPUT
,@ErrorNumber INT OUTPUT
,@ErrorMessage VARCHAR(4000) OUTPUT
,@InsertCase INT --INSERT CASE INPUT
WITH
EXEC AS CALLER AS
BEGIN --Main Begin
SET NOCOUNT ON
BEGIN TRY
DECLARE @SuccessNumber INT = 0
,@SuccessMessage VARCHAR(100) = 'SUCCESS'
,@BenchMarkLoadFlag CHAR(1)
,@BenchmarkFlow INT
,@MonthYearStart DATE
,@MonthYearEnd DATE
,@StartDate DATE
,@EndDate DATE
/* Setting the default values of output parameters to 0.*/
SET @SourceRowCount = 0
SET @TargetRowCount = 0
/*Setting the Start and end date for looping */
SET @MonthYearStart = @IncrStartDate;
SET @MonthYearEnd = @IncrEndDate;
/* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
@InsertCase =0 means data will be inserted in the target TAB1
@InsertCase =1 means data will be inserted in the target TAB2
@InsertCase =2 means data will be inserted in the target TAB3
@InsertCase =3 means data will be inserted in the target TAB4
@InsertCase =4 means data will be inserted in the target TAB5
@InsertCase =5 means data will be inserted in the target TAB6
if @InsertCase =0
WHILE (@MonthYearStart <= @MonthYearEnd)
BEGIN
SET @StartDate = @MonthYearStart;
SET @EndDate = @MonthYearEnd;
/* Delete from target where date range given from input parameter*/
DELETE FROM TAB1
WHERE [MONTH] BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
AND [YEAR] BETWEEN year(@StartDate) and year(@EndDate)
/*Insert data in target-TAB1 */
BEGIN TRANSACTION
INSERT INTO TAB1
A,B,C
SELECT
A,BC
FROM XYZ
COMMIT TRANSACTION
SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
END -- End of whileloop
END TRY
BEGIN CATCH
IF @@TRANCOUNT>0
ROLLBACK TRANSACTION
SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
END CATCH
END--End of Main Begin
I have the above proc inserting data based on parameters where in @InsertCase is used for case wise execution.
I have written the whole proc with exception handling using try catch block.
I have just added one insert statement here for 1 case now I need to add further insert cases
INSERT INTO TAB4
A,B,C
SELECT
A,BC
FROM XYZ
INSERT INTO TAB3
A,B,C
SELECT
A,BC
FROM XYZ
INSERT INTO TAB2
A,B,C
SELECT
A,BC
FROM XYZ
I will be using following to insert further insert statements
if @InsertCase =1
I just needed to know where will be my next insert statement should be fitting int his code so that i cover exception handling for all the code
MudassarHi Erland & Mudassar, I have attempted to recreate Mudassar's original problem..here is my TABLE script;
USE [MSDNTSQL]
GO
/****** Object: Table [dbo].[TAB1] Script Date: 2/5/2014 7:47:48 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TAB1](
[COL1] [nvarchar](1) NULL,
[COL2] [nvarchar](1) NULL,
[COL3] [nvarchar](1) NULL,
[START_MONTH] [int] NULL,
[END_MONTH] [int] NULL,
[START_YEAR] [int] NULL,
[END_YEAR] [int] NULL
) ON [PRIMARY]
GO
Then here is a CREATE script for the SPROC..;
USE [MSDNTSQL]
GO
/****** Object: StoredProcedure [dbo].[TryCatchTransactions1] Script Date: 2/5/2014 7:51:33 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[TryCatchTransactions1] (
@IncrStartDate DATE
,@IncrEndDate DATE
,@SourceRowCount INT OUTPUT
,@TargetRowCount INT OUTPUT
,@ErrorNumber INT OUTPUT
,@ErrorMessage VARCHAR(4000) OUTPUT
,@InsertCase INT --INSERT CASE INPUT
WITH
EXEC AS CALLER AS
BEGIN --Main Begin
SET NOCOUNT ON
BEGIN TRY
DECLARE @SuccessNumber INT = 0
,@SuccessMessage VARCHAR(100) = 'SUCCESS'
,@BenchMarkLoadFlag CHAR(1)
,@BenchmarkFlow INT
,@MonthYearStart DATE
,@MonthYearEnd DATE
,@StartDate DATE
,@EndDate DATE
/* Setting the default values of output parameters to 0.*/
SET @SourceRowCount = 0
SET @TargetRowCount = 0
/*Setting the Start and end date for looping */
SET @MonthYearStart = @IncrStartDate;
SET @MonthYearEnd = @IncrEndDate;
/* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
@InsertCase =0 means data will be inserted in the target TAB1
@InsertCase =1 means data will be inserted in the target TAB2
@InsertCase =2 means data will be inserted in the target TAB3
@InsertCase =3 means data will be inserted in the target TAB4
@InsertCase =4 means data will be inserted in the target TAB5
@InsertCase =5 means data will be inserted in the target TAB6
IF @InsertCase =0
WHILE (@MonthYearStart <= @MonthYearEnd)
BEGIN
SET @StartDate = @MonthYearStart;
SET @EndDate = @MonthYearEnd;
/* Delete from target where date range given from input parameter*/
DELETE FROM TAB1
WHERE START_MONTH BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
AND START_YEAR BETWEEN year(@StartDate) and YEAR(@EndDate)
/*Insert data in target-TAB1 */
BEGIN TRANSACTION
INSERT INTO TAB1 (COL1,COL2,COL3)
VALUES ('Z','X','Y')
SELECT COL1, COL2, COL3
FROM TAB1
COMMIT TRANSACTION
SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
END -- End of whileloop
END TRY
BEGIN CATCH
IF @@TRANCOUNT > 0
ROLLBACK TRANSACTION
SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
END CATCH
PRINT @SUCCESSMESSAGE
END--End of Main Begin
GO
I am just trying to help --danny rosales
UML, then code -
Creating Transport request to update / insert Statement
Hi,
In my program i am changing some standard table values through update/insert open sql statements. to keep the identical landscape i have to do the same for quality and production for which i have to transport my prog to quality and prodn .. is there any possability to record the changes ( i made through update /insert statement) into a change request and just transport the change request to insure that same amount of data is effected.
in other words i have to create and populate transport request in runtime.
Regards,
Alnoor ViraniHi
Are you trying to change values in standard SAP tables using insert / update statement.
If Yes, than this is not the right method / approach to modify values.
You need to find User exit / Badi's to populate the values.
SAP may not support this
Pls check
Regards
Madhan D -
Insert statement is not working for z table.
Hi experts,
My insert statement is not working.
I have used follwing code to update z table .
INSERT ztable FROM TABLE gt_table.
here i have checked gt_table and its filled up with all the records properly.
now the problem is in this table i have 15 fields and it inserts 14 fields of it but
the last field is never inserted though in gt_table i can see value for last fields also.
I have added this field in ztable recently . so i also used se14 to adjust table but still i am facing same problem.
please help me out.
thanks,
Neo> > Table maintainance will have nothing to do with
> this
> > issue.
>
> It does sometimes when you are trying to see the
> values from SM30 instead of SE16. The value may be
> there, but it may just not seen in SM30 because the
> table maintenance hasn't registered the addition of
> new field.
>
> Another place to look at is the activation log to see
> if there are any warnings issued there.
You shouldn't use SM30 to view table entries. You use this transaction to maintain the table entries. Pure and Simple. -
SQL*Loader-930: Error parsing insert statement for column
we upload data on daily basis in application throug apps user and these table are invloved
1. DEV_RA_INTERFACE_LINES_ALL(owner is a apps)
2.RA_INTERFACE_LINES_ALL(owner is a AR)
we do steps
1 delete record from DEV_RA_INTERFACE_LINES_ALL table
2 delete record from RA_INTERFACE_LINES_ALL table
3 load data using sql loader with apps user
4 insert in RA_INTERFACE_LINES_ALL table
we want to change user i mean these step do dataupload user not apps
we give the proper rights to dataupload like select,delete and insert rights on these table to dataupload user but when i going to load data throug sql loader we receive error
SQL*Loader-930: Error parsing insert statement for column APPS.DEV_RA_INTERFACE_
LINES_ALL.ORIG_SYSTEM_BILL_ADDRESS_ID.
ORA-00904: "F_ORIG_SYSTEM_BILL_ADDR_REF": invalid identifier
and if i insert data through apps then done.make sure that u have no speces left
between lines.
give the path of control file path correctly. -
Why Excel insert cell block, hasn't input for data input?
Hi
I found a block for insert new row in excel, but there is no input for data input. how should I insert data by this block to excel file? can you help me?
that block name: Excel insert cells
in report generator toolkit
Best Reagardsbehzad1 a écrit :
I could work with Excel insert cell block, but when I want add new data to an old row continuation, last row shift downward! while I want add data to old row. anyone can help me?
Nobody will be able to identify the problem without seeing your code. Excel Insert Cells.vi is used to add cells to an existing spreadsheet, not to set the cell value. To do this is a more specific way than the Append Report Text.vi you can use Excel Easy Text.vi or Excel Insert Table.vi. With these vis you can specify the range where you want to insert something.
For your other question (Two different data types) you can use the Excel Set Cell Format.vi to format a range as a date or something else. You will need to use the Excel format specifiers for this.
Ben64
Maybe you are looking for
-
ITunes 8.0.2 won't install
I haven't been able to install I-Tunes 8.0.1 or 8.0.2. I have Windows XP. I get the message: "There is a problem with this Windows Installer Package. A program run as part of the set up did not finish as expected. Contact your support personnel or pa
-
hello all- i've been recording a podcast in garageband, and now that our season is over, i'm trying to create a 4-minute (or so) montage of very short clips from 20 podcasts, with music behind them. basically, i've been grabbing the clips from the or
-
How to get system tasks using Java?
I have question about system tasks. I have to list all tasks which are working in the system. Is there any class which i useful to do that? I've tried to write shell script but it won't be working in system different than Linux. I will be grateful fo
-
5850 blackscreen - help please
Posted elsewhere, but as the card is made by MSI, maybe someone here knows the cause/solution I have a msi 5850 twin frozr, and am really struggling to install a recent driver. Much of the blame was put upon having an nvidia card previously, but a cl
-
O/S-Error: (OS 126) The specified module could not be found.
i get this error in my vb6.0 application... "O/S-Error: (OS 126) The specified module could not be found. ROW-00054: Cannot load the library" Assuming my connection is fine... DB is oracle 9.2.0.4 patch installed,MDAC 2.8,VB6.0 My code snipped goes l