時間:2015-06-28 00:00:00 來源:IT貓撲網(wǎng) 作者:網(wǎng)管聯(lián)盟 我要評論(1)
SELECT 1 UPLOAD,
0 SHENGJI,
MR.BUSI_ID,
MASTER.PERSON_ID,
MASTER.ACNT_ID,
MASTER.ID_NUM,
MASTER.NAME,
MASTER.SEX,
MR.MIGRT_OUT_REGION,
MR.OUT_OPERA_TIME,
MR.OUT_OPERA_ID,
MR.IN_OPERA_TIME,
MR.MIGRATE_STATE,
MR.MIGRT_IN_REGION,
case
when MR.MIGRT_IN_REGION is null then
'未選擇'
else
ARC.REGION_NAME
end AS MIGRT_IN_REGION_NAME
FROM ADPM_MIGRATE_CPA MASTER, ADPM_MIGRATE_INFO MR
left join ADPM_REGION_CODE ARC on MR.MIGRT_IN_REGION = ARC.REGION_CODE
WHERE MASTER.PERSON_ID = MR.PERSON_ID
AND (MR.MIGRATE_STATE = '10' OR MR.MIGRATE_STATE = '20' OR
MR.MIGRATE_STATE = '60');
SELECT 1 UPLOAD,
0 SHENGJI,
MR.BUSI_ID,
MASTER.PERSON_ID,
MASTER.ACNT_ID,
MASTER.ID_NUM,
MASTER.NAME,
MASTER.SEX,
MR.MIGRT_OUT_REGION,
MR.OUT_OPERA_TIME,
MR.OUT_OPERA_ID,
MR.IN_OPERA_TIME,
MR.MIGRATE_STATE,
MR.MIGRT_IN_REGION,
case
when MR.MIGRT_IN_REGION is null then
'未選擇'
else
ARC.REGION_NAME
end AS MIGRT_IN_REGION_NAME
FROM ADPM_MIGRATE_CPA MASTER, ADPM_MIGRATE_INFO MR, ADPM_REGION_CODE ARC
WHERE MASTER.PERSON_ID = MR.PERSON_ID
AND (MR.MIGRATE_STATE = '10' OR MR.MIGRATE_STATE = '20' OR
MR.MIGRATE_STATE = '60')
AND MR.MIGRT_IN_REGION = ARC.REGION_CODE(+);
關鍵詞標簽:Oracle
相關閱讀
熱門文章 Oracle中使用alter table來增加,刪除,修改列的語法 oracle中使用SQL語句修改字段類型-oracle修改SQL語句案例 誤刪Oracle數(shù)據(jù)庫實例的控制文件 為UNIX服務器設置Oracle全文檢索
人氣排行 oracle中使用SQL語句修改字段類型-oracle修改SQL語句案例 Oracle中使用alter table來增加,刪除,修改列的語法 ORACLE SQL 判斷字符串是否為數(shù)字的語句 ORACLE和SQL語法區(qū)別歸納(1) oracle grant 授權語句 ORACLE修改IP地址后如何能夠使用 如何加速Oracle大批量數(shù)據(jù)處理 Oracle刪除表的幾種方法