sql 如下
select tjny,
ajbh,
decode(sfxa,'0','立案','1','销案') lxa,
(select mc from zhaj_yw.tt_dm_xsfz_ajlb where dm = ajlb) ajlb,
decode(ajlb,
'020101',
'放火',
'020103',
'爆炸',
'020113',
'爆炸',
'040101',
'杀人',
'040101',
'杀人',
'040103',
'伤害',
'040104',
'伤害',
'040110',
'绑架',
'040105',
'强奸',
'040106',
'强奸',
'050400',
'抢夺',
'050300',
'诈骗',
decode(substr(ajlb, 1, 4),
'0501',
decode(ajlb,'050101', '入抢', '抢劫'),
'0502',
decode(ajlb,'050201',
'入盗',
'050223',
'盗车',
'050224',
'盗车',
'盗窃'),
'0607',
'贩毒',
'0508',
'敲诈',
'其他')) ajlbgl,
decode(ajsx, '1', '现案', '2', '年内月前', '3', '年前') ajsx,
jjsj lasj,
(select fasjz from t_aj_jbqk where ajbh = tj_tjsjy_aj.ajbh and rownum = 1) fasjz,
ydw ladwbh,
(select mc from zhaj_yw.t_dm_gajgjg where dm = ydw and rownum = 1) ladwmc,
(select mc from t_aj_jbqk,zhaj_yw.t_dm_gajgjg where ajbh = tj_tjsjy_aj.ajbh
and fadpcs = dm and rownum = 1) fadpcs
from tj_tjsjy_aj
where glbz = 'T'
and tjny = '200801'
网格数据如下图所示, |