- 人员信息
SELECT k.KJYWRMC,
k.KJYWRBM,
zb.NSRID,
zb.XM,
zb.ZZLX,
zb.ZZHM,
zb.GJ,
zb.XB,
zb.CSNY,
zb.LXDH,
zb.RZSGLX,
zb.RZSGRQ,
zb.LZRQ,
zb.SFCJ,
zb.SFGL,
zb.SFLS,
zb.RZZT,
zb.SBZT,
zb.CJZH,
zb.NSRZT,
f.WJR_CSGJ,
f.WJR_SCRJSJ,
f.WJR_YJLJSJ
FROM KJYWRXXB k
JOIN ITS_NSRJCXXZB zb
ON k.KJYWRID = zb.KJYWRID
LEFT JOIN ITS_NSRJCXXFB f
ON zb.NSRID = f.NSRID
WHERE k.YXBZ=1
- 正常工资薪金
SELECT t.*
FROM
(SELECT n.XM,
n.ZZHM,
n.ZZLX,
g.*
FROM ITS_YKYJ_GZXJB g
JOIN KJYWRXXB k
ON g.[KJYWRID]=k.[KJYWRID]
JOIN ITS_NSRJCXXZB n
ON g.NSRID = n.NSRID
WHERE g.QSRQ >= '#Format(#DateAdd(M,-6, @Date),YYYY-MM-DD)') t;
- 全年一次性奖金
SELECT t.*
FROM
(SELECT q.*,
n.XM,
n.ZZHM,
n.ZZLX
FROM ITS_YKYJ_QNJMXB q
JOIN KJYWRXXB k
ON q.[KJYWRID]=k.[KJYWRID]
JOIN ITS_NSRJCXXZB n
ON q.NSRID = n.NSRID
WHERE q.QSRQ >= '#Format(#DateAdd(M,-6, @Date),YYYY-MM-DD)') t;
- 劳务报酬
SELECT t.*
FROM
(SELECT f.*,
n.XM,
n.ZZHM,
n.ZZLX
FROM ITS_YKYJ_FGZXJB f
JOIN KJYWRXXB k
ON f.[KJYWRID]=k.[KJYWRID]
JOIN ITS_NSRJCXXZB n
ON f.NSRID = n.NSRID
WHERE f.QSRQ >= '#Format(#DateAdd(M,-6, @Date),YYYY-MM-DD)') t;
- 外籍人员正常工资薪金
SELECT t.*
FROM
(SELECT f.*,
n.XM,
n.ZZHM,
n.ZZLX
FROM ITS_FJM_LDSDB f
JOIN KJYWRXXB k
ON f.[KJYWRID]=k.[KJYWRID]
JOIN ITS_NSRJCXXZB n
ON f.NSRID = n.NSRID
WHERE f.QSRQ >= '#Format(#DateAdd(M,-6, @Date),YYYY-MM-DD)') t;
标签:语句,常用,JOIN,NSRID,zb,KJYWRID,SQL,ITS,SELECT
From: https://www.cnblogs.com/masg/p/17187674.html