Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:关于SQL

1楼
实话实说 发表于:2024/4/21 11:02:00
SELECT TOP 10 * FRO M {订单}
以上是从后台订单表提取10条记录。我想记录数是东态交互的,以下SQL语句不行

If Forms("销售订单").Controls("RadioButton4").Checked = True
Dim g As Single
g = Forms("销售订单").Controls("排名").text
Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "Select  top g 客户,sum(订单数量) as 数量,sum(金额) as 金额 Fro m {销售订单} group by 客户 order by sum(金额) desc"
dt = cmd.ExecuteReader()
Tables("销售订单_销售订单统计表").DataSource = dt
Tables("销售订单_销售订单统计表").AutoSizeCols() '设置自动列宽
End If
2楼
有点蓝 发表于:2024/4/21 22:11:00
基础问题:http://www.foxtable.com/webhelp/topics/0221.htm

cmd.CommandText = "Select  top " & g & " 客户,sum(订单数量) a...........
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01953 s, 2 queries.