2010年9月12日
摘要: Common Table Expressions (CTEs)和Row_number()函数提供了我们一种优雅的解决方案.下面我们来假设一个常见的场景.零售商一张产品(Items)表,还有一张历史价格(PriceHistory)表.数据如下: 产品表 ItemId PriceStartDate Price1 2004-03-01 00:00:00.000 250.001 2005-06-15 00... 阅读全文
posted @ 2010-09-12 20:49 PetterLiu 阅读(487) 评论(0) 推荐(1) 编辑