日期:2014-05-17 浏览次数:20876 次
select (case when a.TOTALNETUNIT is not null then ( select c.TOTALNETUNIT from FND_DERNAV c where c.SECUCODE=a.secucode and rownum=1 order by c.enddate desc ) else a.totalnetunit end) as MyColumn from FND_DERNAV a inner join FND_DAILYQUOTE b on a.SECUCODE=b.secucode and b.TRADINGDAY=a.ENDDATE
and rownum=1 order by c.enddate desc
------解决方案--------------------