select
t.insale insale,
(select b.price from price1 b where b.oid=t.oid) inprice,
insale*inprice, --报错 找不到inprice
t.sale ,
(select c.price from price1 c where c.oid=t.oid) saleprice,
saleprice*sale --报错 找不到saleprice
from REPORT_TERMINAL_ORG_DAY_MID t;这种时候想相乘会报错,因为别名最后才生效所以会报错,有没有什么解决办法不需要再在外面套1层的???
t.insale insale,
(select b.price from price1 b where b.oid=t.oid) inprice,
insale*inprice, --报错 找不到inprice
t.sale ,
(select c.price from price1 c where c.oid=t.oid) saleprice,
saleprice*sale --报错 找不到saleprice
from REPORT_TERMINAL_ORG_DAY_MID t;这种时候想相乘会报错,因为别名最后才生效所以会报错,有没有什么解决办法不需要再在外面套1层的???
t.insale insale,
select b.price inprice,
insale*b.price,
t.sale ,
c.price saleprice,
c.price*sale
from REPORT_TERMINAL_ORG_DAY_MID t,price1 b,price1 c
where b.oid(+)=t.oid and c.oid(+)=t.oid ;
t.insale*t1.price,
t.sale,
t.sale*t1.price
from REPORT_TERMINAL_ORG_DAY_MID t,price1 t1
where t.oid=t1.oid