首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

VB.NET中按日期分类汇总有关问题

2012-01-09 
VB.NET中按日期分类汇总问题各位大哥,我是初学者我在VB.NET中做了一个按日期查询汇总,但是总是提法我的查

VB.NET中按日期分类汇总问题
各位大哥,我是初学者
我在VB.NET中做了一个按日期查询汇总,但是总是提法我的查询日期字段不在GROUP BY 中,但是如果把它加进去那就没有汇总啊,请问怎么样才能解决啊,对了,还有一个问题,我的日期是直接输入到文本框中的,有什么方法可以直接选择进去,谢谢了,在线等
  cmd.CommandText   +=   "where       purchaser   like   '% "   +   purchaser   +   "% '   and   material_specification   like   '% "   +   specification   +   "% ' "
                cmd.CommandText   +=   "   and     material_name   like   '% "   +   name   +   "% ' "
                cmd.CommandText   +=   "   and     kind   like   '% "   +   kind   +   "% ' "
                cmd.CommandText   +=   "   and     in_time   between   ' "   +   begint   +   " ' "
                cmd.CommandText   +=   "   and   ' "   +   endt   +   " '   group   by   material_name,material_specification,purchaser,kind   ,in_time   order   by   purchaser,material_name,material_specification "
                cmd.Connection   =   conn

如果不加IN_TIME就报错

[解决办法]
1. in_time> = ' " + begint + " ' " and in_time <= ' " + endt + " '
2. 用DataTimePicker

热点排行