根据收款台帐号以及流水码查询人员代码 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