日期:2014-05-16  浏览次数:20640 次

有关sql语句急!!!
select a.nrfl, letterProcessed, letterProcessing from (select nrfl, count(docid) as letterProcessed from wsxf_document where status != 4and create_Date >='2011-11-11 00:00:00' and create_date <= '2011-12-01 23:59:59'group by nrfl) a full outer join (select nrfl, count(docid) as letterProcessing from wsxf_document where status = 4 and create_Date >='2011-11-11 00:00:00' and create_date <= '2011-12-01 23:59:59' group by nrfl) b on a.nrfl = b.nrfl

请教高手,怎样把属于左右表中nrfl字段的的所有的内容在同一个字段中显示出来

------解决方案--------------------
Python code
用to_char转换,然后拼接起来!

------解决方案--------------------
探讨

select nvl(a.nrf1 , b.nrf1)

------解决方案--------------------
NVL(a.nrf1, b.nrf1),应该简单解决了。
因为你的查询中有条件 a.nrf1 = b.nrf1