update T1 
set P1 = b.P1
from T1 a,(select RID,P1 from T1 where Year = 2004 and Month = 5) b
where a.RID = b.RID 
and a.Year = 2004
and a.Month = 6

解决方案 »

  1.   

    update t1 set p1=b.p1
    from t1 a,(
    select rid,p1 from t1 where [year]=2004 and [month]=5
    )b
    where a.RID = b.RID 
    and a.[Year] = 2004
    and a.[Month] = 6
      

  2.   

    update T1 
    set P1 = a.P1
    from T1 a inner join (select RID,P1 from T1 where Year = 2004 and Month = 5) b
    on a.RID = b.RID 
    where a.Year = 2004
    and a.Month = 6
      

  3.   

    update aset P1 = b.P1from T1 a,(select RID,P1 from T1 where Year = 2004,Month = 5) b
    where a.RID = b.RID 
    and a.Year = 2004
    and a.Month = 6
      

  4.   

    update t1
    set P1 = (select P1 from t1 where rid=a.rid and year=2004 and month=5)
    from t1 a
    where year=2004 and month=6
      

  5.   

    update T1 
    set P1 = b.P1
    from T1 a inner join (select RID,P1 from T1 where Year = 2004 and Month = 5) b
    on a.RID = b.RID 
    where a.Year = 2004
    and a.Month = 6
      

  6.   

    update t1 set p1=(select p1 from t1 a join t2 b on a.RID = b.RID where b.Year = 2004 and b.Month = 6 and a.Year = 2004 and a.Month = 5)
      

  7.   

    管理-〉给分->输密码->确定
      

  8.   

    zjcxc(邹建)给50,pisces007(蝶鱼)给20,其它的分别给10,再后面的没了就不给了:)谢谢!