You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT*FROM USER_TAB_COLUMNS A
WHEREA.TABLE_NAME='ํ ์ด๋ธ๋ช '
์ค๋ผํด ํ ์ด๋ธ ์์ ์๊ฐ LAST DDL TIME
SELECT*FROM DBA_OBJECTS WHERE OBJECT_NAME ='ํ ์ด๋ธ๋ช '
์ค๋ผํด SELECT UPDATE / MERGE INTO
UPDATE/*+ bypass_ujvc */
(SELECTA.RQST_EMP_NOAS RQST_EMP_NO,
A.RQST_DEPT_CDAS RQST_DEPT_CD,
A.RQST_GRD_CDAS RQST_GRD_CD,
A.RQST_JOB_POSTAS RQST_JOB_POST,
A.RQST_TEL_NOAS RQST_TEL_NO,
A.INS_IDAS INS_ID,
FN_GET_DEPT_CD(INS_ID) AS DEPT_CD,
FN_GET_GRD_CD(INS_ID) AS GRD_CD,
(SELECT OFFC_TEL_NO FROM VI_SYS_USER
WHERE USER_ID =A.INS_ID) AS OFFC_TEL_NO,
(SELECT JOB_POST FROM VI_SYS_USER
WHERE USER_ID =A.INS_ID) AS JOB_POST
FROM HRM_EXTR_LCTR_MST_20170828_01 A
WHEREA.RQST_EMP_NO<>A.INS_ID
)
SET RQST_EMP_NO = INS_ID
, RQST_DEPT_CD = DEPT_CD
, RQST_GRD_CD = GRD_CD
, RQST_JOB_POST = JOB_POST
, RQST_TEL_NO = OFFC_TEL_NO
MERGE INTO HRM_EXTR_LCTR_MST_20170629 A
USING (
SELECTAA.RQST_NO, BB.EMP_NO, BB.GRD_CD, BB.DEPT_CD, BB.JOB_POST, CC.OFFC_TEL_NOFROM HRM_EXTR_LCTR_MST_20170629 AA
JOIN HRM_BAS_DTL BB ONAA.INS_ID=BB.EMP_NOJOIN VI_SYS_USER CC ONAA.INS_ID=CC.USER_IDWHEREAA.RQST_EMP_NO<>AA.INS_ID
) B
ON (A.RQST_NO=B.RQST_NO)
WHEN MATCHED THEN
UPDATESETA.RQST_EMP_NO=B.EMP_NO
, A.RQST_DEPT_CD=B.DEPT_CD
, A.RQST_GRD_CD=B.GRD_CD
, A.RQST_JOB_POST=B.JOB_POST
, A.RQST_TEL_NO=B.OFFC_TEL_NO
;
์ปฌ๋ผ ์ฝ๋ฉํธ์ ๋ฐ์ดํฐ ์กฐํ
SELECTMAX(COL1) AS RQST_NO,
MAX(COL2) AS RQST_EMP_NO,
MAX(COL3) AS RQST_DEPT_CD
FROM (
SELECT
DECODE(T.COLUMN_NAME,'RQST_NO',C.COMMENTS, '') AS COL1
,DECODE(T.COLUMN_NAME,'RQST_EMP_NO',C.COMMENTS, '') AS COL2
,DECODE(T.COLUMN_NAME,'RQST_DEPT_CD',C.COMMENTS, '') AS COL3
FROM USER_TAB_COLUMNS T, USER_COL_COMMENTS C
WHERET.TABLE_NAME=C.TABLE_NAMEANDT.COLUMN_NAME=C.COLUMN_NAMEANDT.TABLE_NAME='HRM_EXTR_LCTR_MST'ORDER BYT.COLUMN_IDASC) A
UNION ALLSELECT RQST_NO ,
RQST_EMP_NO ,
RQST_DEPT_CD
FROM HRM_EXTR_LCTR_MST