update table1 t1
set t1.前复权参数= (select a from
                         (select  tx_temp.aa a
                                  from table1 t2 
                                  where t1.dd=t2.dd
                                  order by t2.d)
                          where  rownum =1)
这么写的时候提示t1.dd无效,也就是说在
                   (select a from
                         (select  tx_temp.aa a
                                  from table1 t2 
                                  where t1.dd=t2.dd
                                  order by t2.d)
                          where  rownum =1)
不能识别t1.dd请各位高手赐教!!!!

解决方案 »

  1.   

    只有改一下试试:
    update table1 t1
    set t1.前复权参数= (select a from
                             (select  tx_temp.aa a
                                      from table1 t2,table1 t1
                                      where t1.dd=t2.dd
                                      order by t2.d)
                              where  rownum =1)
      

  2.   

    楼上njhart2003的语句与原题的需求相差十万八千里哦。^_^
      

  3.   

    update table1 t1
    set t1.前复权参数= (select a from
                             (select  tx_temp.aa a
                                      from table1 t2 
                                      where t1.dd=t2.dd
                                      order by t2.d)
                              where  rownum =1)
    这么写的时候提示t1.dd无效,是因为循环嵌套太深,2层以上就不能这么写了楼上的方法似乎是给每个t1.前复权参数都赋了相同的值,试试下面的方法:
    update table1 t1
    set t1.前复权参数= (select distinct first_value(tx_temp.aa) over(order by t2.d) a
                               from table1 t2 
                               where t1.dd=t2.dd
                        )
      

  4.   

    update table1 t1
    set t1.前复权参数= (select  min(tx_temp.aa)
                             from table1 t2,table1 t1
                             where t1.dd=t2.dd)
    这样应该可以吧
      

  5.   

    应该是最小的t2.d对应的tx_temp.aa的值,不是最小的tx_temp.aa的值吧
      

  6.   

    update table1 t1
    set t1.前复权参数= (select x.a from t1,
                             (select  tx_temp.aa a
                                      from table1 t2 
                                      where t1.dd=t2.dd
                                      order by t2.d) x
                              where  rownum =1)这样可以吗?