当前位置:数据库 > SYBASE >>

sybase查询语句

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

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,