表结构
title 
CreDate查询数据后要按CreDate分组显示
在前台页面显示的格式如下:Wed Dec 23
$499 / 2br - Their loss your gain we have Foreclosed homesc - (atlanta) 
$1500 / 4br - FULLY FURNISHED -Awesome Community - Tennis/Swim - (Roswell) 
Wed Dec 22
At Last Buying A home Is Easy and As Cheap as Renting!! - (Atlanta) img 
$950 / 3br - 3Brd/2Bath, 3082 sqft home in a spectacular community - (otp west) pic 我现在的想法是,根据查询条件把分页的结果用一个DataTable返回给前台页面,再在前台把DataTable按CreDate分组(在asp.net不好实现),根据CreDate从DataTable取该天的数据,在asp.net要用两个Repeater嵌套。有没有简单好用的解决方案

解决方案 »

  1.   

    查询数据后要按CreDate分组显示 select CreDate , sum() , max() , min() ,avg() , count() .... from tb group by CreDate在前台页面显示的格式如下: 
    这个SQL做不到,去前台编写代码完成.
      

  2.   

    select *
    from 表
    order by CreDate desc就行了,显示的处理应该由你的ASP来处理。一般是dOldDate = 1900-01-01
    rs.open select * from 表 order by CreDate desc
    do while not rs.eof
     if dOldDate <> rs.fields("CreDate").value then 
     ...