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修使用低权限Oracle数据库账户得到管理员权限Oracle对user的访问控制
人气排行 ORACLE SQL 判断字符串是否为数字的语句Oracle中使用alter table来增加,删除,修改列的语法ORACLE和SQL语法区别归纳(1)oracle grant 授权语句如何加速Oracle大批量数据处理Oracle删除表的几种方法ORACLE修改IP地址后如何能够使用Oracle 10g创建表空间和用户并指定权限
查看所有0条评论>>