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请各位高手赐教!!!!
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请各位高手赐教!!!!
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)
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
)
set t1.前复权参数= (select min(tx_temp.aa)
from table1 t2,table1 t1
where t1.dd=t2.dd)
这样应该可以吧
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)这样可以吗?