【发布时间】:2013-03-11 15:55:47
【问题描述】:
我使用 asp.net 动态数据来显示我在 sql server 数据库中的几个表的内容,这非常酷。除此之外,我正在尝试做另一件事。
说有一张桌子
CustomerComplaints
- some fields
- CustomerName
- ComplaintType
- ComplaintDate
- other fields
我想与最常抱怨的客户一起展示视图
所以我创建了一个视图
select CustomerName, count(*) ComplaintCount from CustomerComplaints group by CustomerName
但我还希望能够传入可选的 AfterDate 和 BeforeDate 以过滤 ComplaintDate 以执行我的 Top Compalining Customer 视图。
在不为这个问题创建一个非常具体的页面的情况下,有什么好的方法可以做到这一点?
谢谢
【问题讨论】:
标签: c# asp.net sql asp.net-dynamic-data