asp net sql每一天一组查询循环代码 按天一组循环数据
2020-12-27 16:16
今天做网站,发现有个需求是,按天一组循环数据,思路如下:先查询 每天时间,并且去重复。然后带入每天日期如循环即可
如:
'查询日期去重复 日期就是当天格式。不能带分钟
Sqll="Select distinct top 60 LastTime From Guan_B_Info where cid=24 Order By LastTime Desc"
然后在带入日期去查询 ,循环。
Sql=" And Guan_B_Info.LastTime=#"&rsl("LastTime")&"#"
Sql="Select Guan_B_Info.IID,Guan_B_Info.SID,Guan_B_Info.CID,Guan_B_Info.OID,Guan_B_Info.LID,Guan_B_Info.SameContent,Guan_B_Sort.SameContent,Guan_B_Info.LastTime From Guan_B_Info,Guan_B_Sort Where Guan_B_Info.LID="&LID&" And Guan_B_Info.CID="&CID&" And Guan_B_Sort.SID=Guan_B_Info.SID"&Sql&" Order By Guan_B_Info.iid Desc"
【责任编辑:小戴工程师】
上一篇:asp ACCESS数据库怎么查当前统计一个月 一天 一周的数据 下一篇:Photoshop CS6 打字不能打出空格和出现字体无法完成请求因为程序最新文章
2020-12-27 16:16
相关文章
2020-12-27 16:16