時(shí)間:2015-06-28 00:00:00 來(lái)源:IT貓撲網(wǎng) 作者:網(wǎng)管聯(lián)盟 我要評(píng)論(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(+);
關(guān)鍵詞標(biāo)簽:Oracle
相關(guān)閱讀
熱門文章 Oracle中使用alter table來(lái)增加,刪除,修改列的語(yǔ)法 oracle中使用SQL語(yǔ)句修改字段類型-oracle修改SQL語(yǔ)句案例 誤刪Oracle數(shù)據(jù)庫(kù)實(shí)例的控制文件 為UNIX服務(wù)器設(shè)置Oracle全文檢索
人氣排行 oracle中使用SQL語(yǔ)句修改字段類型-oracle修改SQL語(yǔ)句案例 Oracle中使用alter table來(lái)增加,刪除,修改列的語(yǔ)法 ORACLE SQL 判斷字符串是否為數(shù)字的語(yǔ)句 ORACLE和SQL語(yǔ)法區(qū)別歸納(1) oracle grant 授權(quán)語(yǔ)句 ORACLE修改IP地址后如何能夠使用 如何加速Oracle大批量數(shù)據(jù)處理 Oracle刪除表的幾種方法