sisibest

导航

2013年7月2日

update field

摘要: UPDATE dbo.HotelPolicy SET HPFactorMark=TB.MarkValue FROM(select HPF.HPFRPolicyId AS ID ,CONVERT(int,ISNULL(SUM(POWER(2,HPF.HPFRFactorId-1)),0)) AS MarkValueFROM HotelPolicyFactorRelation HPFinner join dbo.HotelPolicy HP on HPF.HPFRPolicyId=HP.IdWHERE HPF.HPFRFactorId NOT IN (5,7,8,9) GROUP BY HPF.H 阅读全文

posted @ 2013-07-02 13:19 sisibest 阅读(187) 评论(0) 推荐(0) 编辑

更新表中字段

摘要: UPDATE dbo.HotelPolicy SET HPFactorMark=TB.MarkValue FROM(select HPF.HPFRPolicyId AS ID ,ISNULL(SUM(POWER(2,HPF.HPFRPolicyId-1)),0) AS MarkValueFROM HotelPolicyFactorRelation HPFinner join dbo.HotelPolicy HP on HPF.HPFRPolicyId=HP.IdWHERE HPF.HPFRFactorId NOT IN (5,7,8,9) GROUP BY HPF.HPFRPolicyId) 阅读全文

posted @ 2013-07-02 11:13 sisibest 阅读(159) 评论(0) 推荐(0) 编辑