반응형
최초 작성일 : 2010/03/19 16:31
MERGE INTO grp_pub_prsnet_info A
USING DUAL B
ON (
GRP_CD = '0090' AND PRSNET_ID IN( '12357', '12325', '12365' )
)
WHEN MATCHED THEN
UPDATE SET PUB_RANGE = 'A'
WHEN NOT MATCHED THEN
INSERT VALUES ('0090', 'headyoon',
(SELECT prsnet_id
FROM prsnet_info
WHERE 1=1
AND prsnet_id IN( '12357', '12325', '12365' )),
'N',
to_char(sysdate,'YYYYMMDD'),
'A'
);
USING DUAL B
ON (
GRP_CD = '0090' AND PRSNET_ID IN( '12357', '12325', '12365' )
)
WHEN MATCHED THEN
UPDATE SET PUB_RANGE = 'A'
WHEN NOT MATCHED THEN
INSERT VALUES ('0090', 'headyoon',
(SELECT prsnet_id
FROM prsnet_info
WHERE 1=1
AND prsnet_id IN( '12357', '12325', '12365' )),
'N',
to_char(sysdate,'YYYYMMDD'),
'A'
);
반응형
'Development > Tips' 카테고리의 다른 글
[옛 글] [linux] watch 명령어 (0) | 2013.07.16 |
---|---|
[옛 글] [Tip] enum 선언 (0) | 2013.07.15 |
[옛 글] [Tip] alloc(new), copy, retain (0) | 2013.07.15 |
[옛 글] [Tip] UITableView (0) | 2013.07.08 |
[옛 글] [DBMS]repository create error 처리 (0) | 2013.07.05 |