1、用友数据库各表之间的关联select C。cPBVBillType 发票类型,C.dPBVDate 开票日期,C.dSDate 结算日期,C.cPBVCode 采购发票号,I.cPOID 采购订单-号,A。cInvCode 存货编码,D。cinvname as 存货名称,D.cinvstd as 规格,E。cComUnitName 单位,-A。iPBVQuantity 发票数量,A。iCost 发票本币单价,A.iMoney 发票本币金额,A。iSum 发票本币价税合计,B。iQuantity 订单数量,B.iNatUnitPrice 订单本币单价,B。iNatMoney 订单本币无税金额,B
2、.iNatSum 订单本币价税合-计,C。cVenCode 供应商编码,F。cVenName 供应商名称,C.cUnitCode 代垫单位编码,H。cVenName 代垫单位名称,C.cPBVMaker 发票制单人-from PurBillVouchs as A-left join PO_Podetails as B on A。iPOsID=B.ID-left join PurBillVouch as C on A.PBVID=C.PBVID-left join inventory as D on A.cInvCode=D.cinvcode left join ComputationUnit as E on D.cComUnitCode=E.cComunitCodeleft join Vendor as F on C。cVenCode=F。cVenCodeleft join Vendor as H on C.cUnitCode =H。cVenCodeleft join PO_Pomain as I on B.POID=I。POIDwhere dPBVDate between 2016-01-01 00:00:00。000 and 201612-31 00:00:00.000