以下为企业所得税分企业入库SQL语句
--SP_QYSDS_ID
SELECT nsrsbh,nsrmc FROM DJ_NSRXX
where nsrsbh=&&c430005000000061
--SP_QYSDS_JNBY今年本月入库
SELECT nsrsbh,round(SUM(SE)/10000,2) FROM SB_ZSXX WHERE rkrq>=$$0011 and rkrq<=$$0012 AND RKSKBZ = 'Y' AND ZSXM_DM in ('04','05') and nsrsbh=&&c430005000000061 group by nsrsbh
--SP_QYSDS_JNLJ今年累计入库
SELECT nsrsbh,round(SUM(SE)/10000,2) FROM SB_ZSXX WHERE rkrq>=$$0010 and rkrq<=$$0012 AND RKSKBZ = 'Y' AND ZSXM_DM in ('04','05') and nsrsbh=&&c430005000000061 group by nsrsbh
--SP_QYSDS_QNTY去年同月入库
SELECT nsrsbh,round(SUM(SE)/10000,2) FROM SB_ZSXX WHERE RKRQ >=add_months( $$0011,-12) AND (RKRQ
--SP_QYSDS_QNLJ去年累计入库
SELECT nsrsbh,round(SUM(SE)/10000,2) FROM SB_ZSXX WHERE RKRQ >=add_months( $$0010,-12) AND (RKRQ2100433B