Foxtable(狐表)用户栏目专家坐堂 → 错误提示


  共有1997人关注过本帖树形打印复制链接

主题:错误提示

帅哥哟,离线,有人找我吗?
yetle
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:858 积分:6381 威望:0 精华:0 注册:2017/2/13 9:04:00
错误提示  发帖心情 Post By:2020/8/11 17:41:00 [只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:微信图片_20200623133850.png
图片点击可在新窗口打开查看


代码如下
Dim tB As Table = Tables("对接工资分析_table1")
Dim tB2 As Table = Tables("对接工资分析_table2")
Dim tB3 As Table = Tables("对接工资分析_table3")
Dim tB4 As Table = Tables("对接工资分析_table4")
If Forms("对接工资分析").Opened()
 tB.Fill("select  实际生产员工,sum(a.件数*a.工价) F rom  派发工序表 a left join 员工管理 b on a.实际生产员工=b.姓名  where   实际生产员工 is not null and  month(a.扫码时间)=datename(month,getdate()) and year(a.扫码时间)=datename(year,getdate())  and a.单据状态='已完成' and a.件数*a.工价>0  group by 实际生产员工 order by 实际生产员工" , "xsc_erp",True)
 tB2.Fill(" SELECT 实际生产员工,SUM(MonMoney) F ROM  [ERP_JMH].dbo.Fa_Gz WHERE   month(indate)=datename(month,getdate()) and year(indate)=datename(year,getdate()) and 订单号 is not null group by 实际生产员工   order by 实际生产员工 " , "dingbang",True)
 tB3.Fill("select  实际生产员工,(convert(varchar(8),扫码时间,112)) AS "日期",sum(a.件数*a.工价) F rom  {派发工序表} a left join {员工管理} b on a.实际生产员工=b.姓名  where   month(a.扫码时间)=datename(month,getdate())  And year(a.扫码时间)=datename(year,getdate())  And (a.件数*a.工价)>0 And a.实际生产员工 Is not null  group by 实际生产员工,(convert(varchar(8),扫码时间,112)) order by 实际生产员工,(convert(varchar(8),扫码时间,112))" , "xsc_erp",True)
 tB4.Fill(" SELECT 实际生产员工,(convert(varchar(8),[indate],112)) AS "日期",SUM(MonMoney) F ROM  {Fa_Gz} WHERE   month(indate)=datename(month,getdate()) And year(indate)=datename(year,getdate()) And 订单号 Is not null group by 实际生产员工,(convert(varchar(8),[indate],112))  order by 实际生产员工,(convert(varchar(8),[indate],112))" , "dingbang",True)
End If


 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106853 积分:543472 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/8/11 20:14:00 [只看该作者]

tB3.Fill("select  实际生产员工,(convert(varchar(8),扫码时间,112)) AS 日期,sum(a.件数*a.工价) F rom  {派发工序表} a left join {员工管理} b on a.实际生产员工=b.姓名  where   month(a.扫码时间)=datename(month,getdate())  And year(a.扫码时间)=datename(year,getdate())  And (a.件数*a.工价)>0 And a.实际生产员工 Is not null  group by 实际生产员工,(convert(varchar(8),扫码时间,112)) order by 实际生产员工,(convert(varchar(8),扫码时间,112))" , "xsc_erp",True)

 回到顶部