Foxtable(狐表)用户栏目专家坐堂 → sql


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

主题:sql

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


加好友 发短信
等级:八尾狐 帖子:1936 积分:14844 威望:0 精华:0 注册:2016/4/28 9:58:00
sql  发帖心情 Post By:2017/4/8 21:26:00 [只看该作者]

Dim school As String = User.Group
If user.IsRole("区业务主管")
e.Form.Controls("label1").text = "中考信息统计"
Else
e.Form.Controls("label1").text = school & "中考信息统计"
End If

Dim lbl As WinForm.Label = e.Form.Controls("Label1")
If e.Form.width > lbl.Width
    lbl.Left = (e.Form.width - lbl.Width ) / 2
   End If
Dim t As Table = e.Form.controls("Table2").Table
If user.IsRole("区业务主管")
t.Fill("sele ct xxmc,bjdm, (se lect count(*) from {中考表} as b where a.xxmc=b.xxmc and a.bjdm=b.bjdm as 人数, (Sele ct count(*) from {中考表} As b where a.xxmc=b.xxmc And a.bjdm=b.bjdm And xb='1') as 男,(sel ect count(*) from {中考表} as b where a.xxmc=b.xxmc and a.bjdm=b.bjdm and xb='2') as 女, (sel ect count(*) from {中考表} as b where a.xxmc=b.xxmc and a.bjdm=b.bjdm and hklb='1') as 农业户口, (sel ect count(*) from {中考表} as b where a.xxmc=b.xxmc and a.bjdm=b.bjdm and hklb='2') as 非农业户口 from (sel ect xxmc,bjdm from {中考表} group by xxmc,bjdm) as a", "180.153.1 08.50", True)
End If
t.sort = "xxmc,bjdm"
For Each c As Col In t.Cols
    If c.IsNumeric Then
        c.GrandTotal = True
    End If
Next
t.GrandTotal = True 
t.AutoSizeCols()

sql语法错误,老师,对sql语句不懂,照到改了一个统计,提示错误,请问是哪里有误




 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/4/9 10:48:00 [只看该作者]

在sql测试窗口单独测试你的sql语句,看报什么错,然后删减sql语句确定出错位置。

 

http://www.foxtable.com/webhelp/scr/1484.htm

 


 回到顶部