Select SUBSTRING(lfid,1,4) + '年' AS 缴费年度,
CAST(bldCByf AS char(2)) +'月' As 参保月份,jffs As 缴费方式
(Select '已审' as '审核'WHERE YBzgsj.ZJFFID =-1 ) AS 缴费
From YBzgsj
WHERE ZGid =1120
ORDER BY lfid ;
Select SUBSTRING(lfid,1,4) + '年' AS 缴费年度,
CAST(bldCByf AS char(2)) +'月' As 参保月份,
(Select jffs From z_JFFS WHERE z_JFFS.ID = YBzgsj.jffs) AS 缴费方式,
(Select '已审' WHERE YBzgsj.ZJFFID =-1 ) AS 审核
From YBzgsj
WHERE zgid =1120 ORDER BY lfid ;
Select SUBSTRING(lfid,1,4) + '年' AS 缴费年度,
CAST(bldCByf AS char(2)) +'月' As 参保月份,
case 缴费方式 when 1 then 单基数缴费 when 2 then 双基数缴费 when 3 then 个人承担 end ,
case 审核 when -1 then 已审核 end
From YBzgsj
WHERE zgid =1120 ORDER BY lfid ;