Chinaunix首页 | 论坛 | 博客
  • 博客访问: 950732
  • 博文数量: 168
  • 博客积分: 3853
  • 博客等级: 中校
  • 技术积分: 1854
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-15 23:50
文章分类

全部博文(168)

文章存档

2014年(12)

2013年(46)

2012年(60)

2011年(11)

2010年(1)

2009年(17)

2008年(21)

我的朋友

分类: SQLServer

2014-04-11 12:02:34



  update [Pro_Products] set MaxRatio=b.maxRate,MinRatio=b.minRate,MaxTerm=b.maxTerm,minTerm=b.minTerm  
  from Pro_Products A,
  (select MAX(Term) as maxTerm,MIN(term) as minTerm,MAX(YieldRate) as maxRate,MIN(YieldRate)as minRate,ProductId 
  from Pro_YieldRate group by ProductId) B
  where A.Id=B.ProductId and B.ProductId in
  (select ProductId from inserted union select ProductId from deleted )
阅读(1049) | 评论(0) | 转发(0) |
0

上一篇:Openssl的安装

下一篇:Java 父子类加载顺序

给主人留下些什么吧!~~