根據收款台帳號以及流水碼查詢人員代碼
SELECT * FROM RYXX WHERE DEPTID IN (select DEPTID from XSJLC where SKTNO='049' AND JLBH=150735)
--對應櫃組下商品信息
select B.DEPTID,B.DEPT_NAME,R.PERSON_NAME,R.RYDM,S.NAME,S.SPCODE from BFBHDD.GTSP G,BFBHDD.SPXX S,BFBHDD.RYXX R,BFBHDD.BM B,BFBHDD.RYXX_JXC Y
where G.SP_ID=S.SP_ID
and G.DEPTID=B.DEPTID
and Y.DEPTID=B.DEPTID
and Y.PERSON_ID=R.PERSON_ID