-- 1. 오라클 버전
SELECT * FROM v$version;
BANNER
---------------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit
PL/SQL Release 10.2.0.3.0 - Production
-- 2. create table
DROP TABLE EMP PURGE;
DROP TABLE DEPT PURGE;
CREATE TABLE EMP AS
SELECT -- 1. EMPNO(Unique 컬럼)
LEVEL EMPNO,
-- 2. EMPNO(VARCHAR로 변형)
TO_CHAR(LEVEL) EMPNO_VARCHAR,
-- 3. JOB(10만건 데이터를 20개 그룹으로 분류)
CHR(65 + CEIL(LEVEL / 500000) - 1) JOB,
-- 4. HIREDATE(10개씩 증가하여 날짜 데이터 만듬)
TO_DATE('00010101', 'YYYYMMDD') + CEIL(LEVEL / 10) - 1 HIREDATE,
-- 5. DEPTNO(자리수 길이를 한 그룹으로 하여 데이터 생성, 분포도 차이나도록)
LENGTH(LEVEL) * 10 DEPTNO
FROM DUAL
CONNECT BY LEVEL <= 100000
;
CREATE TABLE DEPT AS
SELECT LEVEL * 10 DEPTNO,
'SALES_' || LEVEL DNAME,
'ZONE_' || LEVEL LOC
FROM DUAL
CONNECT BY LEVEL <= 9
;
-- 3. create index
CREATE UNIQUE INDEX EMP_U1 ON EMP (EMPNO) COMPUTE STATISTICS PARALLEL 8;
ALTER INDEX EMP_U1 NOPARALLEL;
CREATE INDEX EMP_N1 ON EMP (DEPTNO) COMPUTE STATISTICS PARALLEL 8;
ALTER INDEX EMP_N1 NOPARALLEL;
CREATE INDEX EMP_N2 ON EMP (HIREDATE) COMPUTE STATISTICS PARALLEL 8;
ALTER INDEX EMP_N2 NOPARALLEL;
CREATE INDEX EMP_N3 ON EMP (EMPNO_VARCHAR) COMPUTE STATISTICS PARALLEL 8;
ALTER INDEX EMP_N3 NOPARALLEL;
CREATE UNIQUE INDEX DEPT_U1 ON DEPT (DEPTNO);
-- 4. gather statistics
EXEC DBMS_STATS.GATHER_TABLE_STATS(USER, 'EMP', CASCADE => TRUE, DEGREE => 8);
EXEC DBMS_STATS.GATHER_TABLE_STATS(USER, 'DEPT', CASCADE => TRUE);
-- 5. View EMP Table Statistics
*************[ Table Info ]**********************************************************************************************************************************************************
COLUMN_NAME DATA_TYPE DATA_LEN Null DISTINCT_KEY DENSITY NUM_NULLS NUM_BUCKETS SAMPLE_SIZE LAST Analyzed HISTOGRAM Default Value
------------------------------ ---------- -------- ---- -------------- ---------- -------------- ----------- -------------- ------------------- --------------- ---------------------
DEPTNO NUMBER 22 Y 4 .25 0 1 4,996 2010-03-31 19:36:04 NONE
EMPNO NUMBER 22 Y 99,600 .00001004 0 1 4,996 2010-03-31 19:36:04 NONE
EMPNO_VARCHAR VARCHAR2 40 Y 100,000 .00001 0 1 100,000 2010-03-31 19:36:04 NONE
HIREDATE DATE 7 Y 10,000 .0001 0 1 100,000 2010-03-31 19:36:04 NONE
JOB VARCHAR2 3 Y 1 1 0 1 4,996 2010-03-31 19:36:04 NONE
OWNER.TABLE NAME AVG USED_BLOCKS PCTFREE/ INITRAN Init/Next/ FLst/ IOT_Name/ Duration
[TABLESPACE NAME] NUMBER_OF_ROWS ROWLEN EMPTY_BLOCKS DEG CHAIN USED/INCR MAXTRAN MIN/MAX FGrp IOT_Type LAST Analyzed Dropped
---------------------------------------- -------------- ------- ------------- ---- -------- --------- ------- ------------- ----- --------------- ------------------- ---------------
USER.EMP 100,000 23 413 1 0 10//0 1/255 128k/128k / 2010-03-31 19:36:04
[USER_TS_TX_DATA] 0 1/Unlimit NO
NUMBER_ROWS CLUSTERING BLEVEL AvgLfBlperKEY INITRAN Init/Next/ FLst/
OWNER.INDEX_NAME TABLESPACE DISTINCT_KEY FACTOR LEAF_BLOKCS AvgDtBlperKEY DEG LOGGIN MAXTRAN MIN/MAX FGrp LAST Analyzed
---------------------------------------- ---------------------- --------------- -------------- ------------ ------------- ---- ------ ------- ------------- ----- -------------------
USER.EMP_N1 USER_TS_TX_DATA 100,000 401 [1] 32 1 YES 2/255 128k/128k / 2010-03-31 19:36:06
6 196 66 1/unlimit
USER.EMP_N2 USER_TS_TX_DATA 100,000 401 [1] 1 1 YES 2/255 128k/128k / 2010-03-31 19:36:07
10,000 266 1 1/unlimit
USER.EMP_N3 USER_TS_TX_DATA 100,000 19,298 [1] 1 1 YES 2/255 128k/128k / 2010-03-31 19:36:08
100,000 236 1 1/unlimit
USER.EMP_U1 USER_TS_TX_DATA 100,000 399 [1] 1 1 YES 2/255 128k/128k / 2010-03-31 19:36:05
100,000 208 1 1/unlimit
OWNER.INDEX_NAME Uniq Type Status Drop COLUMN LIST
---------------------------------------- ---- ------ ------ ---- --------------------------------------------------------------------------------------------------------------------
USER.EMP_N1 NONU NORMAL VALID NO DEPTNO
USER.EMP_N2 NONU NORMAL VALID NO HIREDATE
USER.EMP_N3 NONU NORMAL VALID NO EMPNO_VARCHAR
USER.EMP_U1 UNIQ NORMAL VALID NO EMPNO
-- 6. View DEPT Table Statistics
*************[ Table Info ]**********************************************************************************************************************************************************
COLUMN_NAME DATA_TYPE DATA_LEN Null DISTINCT_KEY DENSITY NUM_NULLS NUM_BUCKETS SAMPLE_SIZE LAST Analyzed HISTOGRAM Default Value
------------------------------ ---------- -------- ---- -------------- ---------- -------------- ----------- -------------- ------------------- --------------- ---------------------
DEPTNO NUMBER 22 Y 9 .111111111 0 1 9 2010-03-31 19:36:09 NONE
DNAME VARCHAR2 46 Y 9 .111111111 0 1 9 2010-03-31 19:36:09 NONE
LOC VARCHAR2 45 Y 9 .111111111 0 1 9 2010-03-31 19:36:09 NONE
OWNER.TABLE NAME AVG USED_BLOCKS PCTFREE/ INITRAN Init/Next/ FLst/ IOT_Name/ Duration
[TABLESPACE NAME] NUMBER_OF_ROWS ROWLEN EMPTY_BLOCKS DEG CHAIN USED/INCR MAXTRAN MIN/MAX FGrp IOT_Type LAST Analyzed Dropped
---------------------------------------- -------------- ------- ------------- ---- -------- --------- ------- ------------- ----- --------------- ------------------- ---------------
USER.DEPT 9 18 4 1 0 10//0 1/255 128k/128k / 2010-03-31 19:36:09
[USER_TS_TX_DATA] 0 1/Unlimit NO
NUMBER_ROWS CLUSTERING BLEVEL AvgLfBlperKEY INITRAN Init/Next/ FLst/
OWNER.INDEX_NAME TABLESPACE DISTINCT_KEY FACTOR LEAF_BLOKCS AvgDtBlperKEY DEG LOGGIN MAXTRAN MIN/MAX FGrp LAST Analyzed
---------------------------------------- ---------------------- --------------- -------------- ------------ ------------- ---- ------ ------- ------------- ----- -------------------
USER.DEPT_U1 USER_TS_TX_DATA 9 1 [0] 1 1 YES 2/255 128k/128k / 2010-03-31 19:36:09
9 1 1 1/unlimit
OWNER.INDEX_NAME Uniq Type Status Drop COLUMN LIST
---------------------------------------- ---- ------ ------ ---- --------------------------------------------------------------------------------------------------------------------
USER.DEPT_U1 UNIQ NORMAL VALID NO DEPTNO
SELECT /*+ ORDERED USE_NL(E D) */
*
FROM EMP E,
DEPT D
WHERE E.DEPTNO = D.DEPTNO
;
Call Count CPU Time Elapsed Time Disk Query Current Rows
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Parse 1 0.000 0.003 0 0 0 0
Execute 1 0.000 0.000 0 0 0 0
Fetch 10001 0.050 1.984 399 120361 0 100000
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Total 10003 0.050 1.987 399 120361 0 100000
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Parsing user: APPS (ID=44)
Rows Row Source Operation
------- ---------------------------------------------------
0 STATEMENT
100000 NESTED LOOPS (cr=120361 pr=399 pw=0 time=1210637 us)
100000 TABLE ACCESS FULL EMP (cr=10360 pr=399 pw=0 time=110599 us)
100000 TABLE ACCESS BY INDEX ROWID DEPT (cr=110001 pr=0 pw=0 time=997420 us)
100000 INDEX UNIQUE SCAN DEPT_U1 (cr=10001 pr=0 pw=0 time=403812 us)(Object ID 19697318)
SELECT /*+ ORDERED USE_NL(E D) */
*
FROM DEPT D,
EMP E
WHERE E.DEPTNO = D.DEPTNO
;
Call Count CPU Time Elapsed Time Disk Query Current Rows
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Parse 1 0.000 0.003 0 0 0 0
Execute 1 0.000 0.000 0 0 0 0
Fetch 10001 0.050 1.168 196 20576 0 100000
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Total 10003 0.050 1.171 196 20576 0 100000
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Parsing user: APPS (ID=44)
Rows Row Source Operation
------- ---------------------------------------------------
0 STATEMENT
100000 TABLE ACCESS BY INDEX ROWID EMP (cr=20576 pr=196 pw=0 time=67708660 us)
100010 NESTED LOOPS (cr=10218 pr=196 pw=0 time=1400730 us)
9 TABLE ACCESS FULL DEPT (cr=8 pr=0 pw=0 time=235 us)
100000 INDEX RANGE SCAN EMP_N1 (cr=10210 pr=196 pw=0 time=67305741 us)(Object ID 19697315)
SELECT /*+ ORDERED USE_NL(E D) */
*
FROM DEPT D,
EMP E
WHERE E.DEPTNO = D.DEPTNO
;
Call Count CPU Time Elapsed Time Disk Query Current Rows
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Parse 1 0.000 0.003 0 0 0 0
Execute 1 0.000 0.000 0 0 0 0
Fetch 10001 0.050 1.168 196 20576 0 100000
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Total 10003 0.050 1.171 196 20576 0 100000
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Parsing user: APPS (ID=44)
Rows Row Source Operation
------- ---------------------------------------------------
0 STATEMENT
100000 TABLE ACCESS BY INDEX ROWID EMP (cr=20576 pr=196 pw=0 time=67708660 us)
100010 NESTED LOOPS (cr=10218 pr=196 pw=0 time=1400730 us)
9 TABLE ACCESS FULL DEPT (cr=8 pr=0 pw=0 time=235 us)
100000 INDEX RANGE SCAN EMP_N1 (cr=10210 pr=196 pw=0 time=67305741 us)(Object ID 19697315)
;
SELECT /*+ ORDERED USE_NL(E D) */
*
FROM DEPT D,
EMP E
WHERE E.DEPTNO = D.DEPTNO
AND E.EMPNO = 1
;
Call Count CPU Time Elapsed Time Disk Query Current Rows
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Parse 1 0.000 0.004 0 0 0 0
Execute 1 0.000 0.000 0 0 0 0
Fetch 2 0.000 0.000 0 24 0 1
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Total 4 0.000 0.004 0 24 0 1
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Parsing user: APPS (ID=44)
Rows Row Source Operation
------- ---------------------------------------------------
0 STATEMENT
1 NESTED LOOPS (cr=24 pr=0 pw=0 time=185 us)
9 TABLE ACCESS FULL DEPT (cr=4 pr=0 pw=0 time=209 us)
1 TABLE ACCESS BY INDEX ROWID EMP (cr=20 pr=0 pw=0 time=168 us)
9 INDEX UNIQUE SCAN EMP_U1 (cr=11 pr=0 pw=0 time=101 us)(Object ID 19697314)
;
SELECT /*+ ORDERED USE_NL(E D) */
*
FROM EMP E,
DEPT D
WHERE E.DEPTNO = D.DEPTNO
AND E.EMPNO = 1
;
Call Count CPU Time Elapsed Time Disk Query Current Rows
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Parse 1 0.010 0.006 0 0 0 0
Execute 1 0.000 0.000 0 0 0 0
Fetch 2 0.000 0.000 0 5 0 1
------- ------ -------- ------------ ---------- ---------- ---------- ----------
Total 4 0.010 0.006 0 5 0 1
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Parsing user: APPS (ID=44)
Rows Row Source Operation
------- ---------------------------------------------------
0 STATEMENT
1 NESTED LOOPS (cr=5 pr=0 pw=0 time=109 us)
1 TABLE ACCESS BY INDEX ROWID EMP (cr=3 pr=0 pw=0 time=82 us)
1 INDEX UNIQUE SCAN EMP_U1 (cr=2 pr=0 pw=0 time=56 us)(Object ID 19697314)
1 TABLE ACCESS BY INDEX ROWID DEPT (cr=2 pr=0 pw=0 time=21 us)
1 INDEX UNIQUE SCAN DEPT_U1 (cr=1 pr=0 pw=0 time=9 us)(Object ID 19697318)
;
{code:SQL} SELECT /*+ LEADING(WND) USE_NL(WND WDA WDD MP OOH OOL OTT XGSE XLV XCRH XSM XGC XFFH XFFL) */ ............... FROM TABLE_01 XXB, TABLE_02 WND, TABLE_03 WDA, TABLE_04 WDD, TABLE_05 MP, TABLE_06 OOH, TABLE_07 OOL, TABLE_08 OTT, TABLE_09 XGSE, TABLE_10 XLV, TABLE_11 XLV1, TABLE_12 XCRH, TABLE_13 XFFL, TABLE_14 XFFH, TABLE_15 XSM WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO AND XLV1.LOOKUP_CODE = XXB.SHIPPING_LINE_CODE AND XSM.SHIP_METHOD_CODE = XFFH.SHIPPING_METHOD_CODE AND XLV1.ORG_ID = OOH.ORG_ID AND EXISTS (SELECT WDA1.DELIVERY_ID FROM TABLE16 WDA1, TABLE17 WDD1 WHERE WDA1.DELIVERY_DETAIL_ID = WDD1.DELIVERY_DETAIL_ID AND WDA1.DELIVERY_ID = WND.DELIVERY_ID) AND WND.ORGANIZATION_ID = :B1 AND MP.ORGANIZATION_CODE = :B2 AND OOH.ATTRIBUTE1 = :B3 ; {code} |
01. | {code:SQL} WHERE XXB.SR_NO = WND.NAME {code} | |
02. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID {code} | |
03. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID {code} | |
04. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID {code} | |
05. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID {code} | |
06. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID {code} | |
07. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID {code} | |
08. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID {code} | |
09. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID {code} | |
10. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID {code} | |
11. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID {code} | |
12. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) {code} | |
13. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO {code} | |
14. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO AND XLV1.LOOKUP_CODE = XXB.SHIPPING_LINE_CODE {code} | |
15. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO AND XLV1.LOOKUP_CODE = XXB.SHIPPING_LINE_CODE AND XSM.SHIP_METHOD_CODE = XFFH.SHIPPING_METHOD_CODE {code} | |
16. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO AND XLV1.LOOKUP_CODE = XXB.SHIPPING_LINE_CODE AND XSM.SHIP_METHOD_CODE = XFFH.SHIPPING_METHOD_CODE AND XLV1.ORG_ID = OOH.ORG_ID {code} | |
17. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO AND XLV1.LOOKUP_CODE = XXB.SHIPPING_LINE_CODE AND XSM.SHIP_METHOD_CODE = XFFH.SHIPPING_METHOD_CODE AND XLV1.ORG_ID = OOH.ORG_ID AND EXISTS (SELECT WDA1.DELIVERY_ID FROM TABLE16 WDA1, TABLE17 WDD1 WHERE WDA1.DELIVERY_DETAIL_ID = WDD1.DELIVERY_DETAIL_ID AND WDA1.DELIVERY_ID = WND.DELIVERY_ID) {code} | |
18. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO AND XLV1.LOOKUP_CODE = XXB.SHIPPING_LINE_CODE AND XSM.SHIP_METHOD_CODE = XFFH.SHIPPING_METHOD_CODE AND XLV1.ORG_ID = OOH.ORG_ID AND EXISTS (SELECT WDA1.DELIVERY_ID FROM TABLE16 WDA1, TABLE17 WDD1 WHERE WDA1.DELIVERY_DETAIL_ID = WDD1.DELIVERY_DETAIL_ID AND WDA1.DELIVERY_ID = WND.DELIVERY_ID) AND WND.ORGANIZATION_ID = :B1 AND MP.ORGANIZATION_CODE = :B2 AND OOH.ATTRIBUTE1 = :B3 {code} |
19. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO AND XLV1.LOOKUP_CODE = XXB.SHIPPING_LINE_CODE AND XSM.SHIP_METHOD_CODE = XFFH.SHIPPING_METHOD_CODE AND XLV1.ORG_ID = OOH.ORG_ID AND EXISTS (SELECT WDA1.DELIVERY_ID FROM TABLE16 WDA1, TABLE17 WDD1 WHERE WDA1.DELIVERY_DETAIL_ID = WDD1.DELIVERY_DETAIL_ID AND WDA1.DELIVERY_ID = WND.DELIVERY_ID) AND WND.ORGANIZATION_ID = :B1 AND MP.ORGANIZATION_CODE = :B2 AND OOH.ATTRIBUTE1 = :B3 {code} | |
20. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO AND XLV1.LOOKUP_CODE = XXB.SHIPPING_LINE_CODE AND XSM.SHIP_METHOD_CODE = XFFH.SHIPPING_METHOD_CODE --AND XLV1.ORG_ID = OOH.ORG_ID AND XLV1.ORG_ID = :B11 AND EXISTS (SELECT WDA1.DELIVERY_ID FROM TABLE16 WDA1, TABLE17 WDD1 WHERE WDA1.DELIVERY_DETAIL_ID = WDD1.DELIVERY_DETAIL_ID AND WDA1.DELIVERY_ID = WND.DELIVERY_ID) AND WND.ORGANIZATION_ID = :B1 AND MP.ORGANIZATION_CODE = :B2 AND OOH.ATTRIBUTE1 = :B3 {code} | |
21. | {code:SQL} WHERE XXB.SR_NO = WND.NAME AND WND.DELIVERY_ID = WDA.DELIVERY_ID AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND WND.ORGANIZATION_ID = MP.ORGANIZATION_ID AND WDD.SOURCE_HEADER_ID = OOH.HEADER_ID AND WDD.SOURCE_LINE_ID = OOL.LINE_ID AND OTT.TRANSACTION_TYPE_ID = OOH.ORDER_TYPE_ID AND TO_NUMBER(WDD.ATTRIBUTE6) = XFFH.WH_SHP_HEADER_ID AND TO_NUMBER(WDD.ATTRIBUTE7) = XFFL.WH_SHP_LINE_ID AND XFFL.WH_SHP_HEADER_ID = XFFH.WH_SHP_HEADER_ID AND XFFL.WH_SHP_REQ_HEADER_ID = XCRH.WH_SHP_REQ_HEADER_ID AND WND.NAME = XGSE.SR_NO(+) AND TO_CHAR(OOH.ORDER_NUMBER) = XCRH.ORDER_NO AND XLV1.LOOKUP_CODE = XXB.SHIPPING_LINE_CODE AND XSM.SHIP_METHOD_CODE = XFFH.SHIPPING_METHOD_CODE --AND XLV1.ORG_ID = OOH.ORG_ID AND XLV1.ORG_ID = :B11 AND EXISTS (SELECT WDA1.DELIVERY_ID FROM TABLE16 WDA1, TABLE17 WDD1 WHERE WDA1.DELIVERY_DETAIL_ID = WDD1.DELIVERY_DETAIL_ID AND WDA1.DELIVERY_ID = WND.DELIVERY_ID) AND WND.ORGANIZATION_ID = :B1 AND MP.ORGANIZATION_CODE = :B2 AND OOH.ATTRIBUTE1 = :B3 {code} |