所以,我有一个查询,当我用客户端sql开发人员执行它时,我得到结果。
查询:
select * from
(
select art_no, descr, store_no, stock
from (
select * from gr_rep.mmart_analysis@ss001 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss002 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss003 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss004 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss005 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss006 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss007 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss008 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss009 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss010 where disp_info in ( '0','4' )
union all
select * from gr_rep.mmart_analysis@ss011 where disp_info in ( '0','4' )
) x
)
pivot
(
sum(stock)
for store_no in (1,2,3,4,5,6,7,8,9,10,11)
)
order by art_no desc
当我使用像$res = oci_execute($p,OCI_NO_AUTO_COMMIT);
这样的PHP运行时,$n = oci_fetch_all ($p, $res, null, null, OCI_FETCHSTATEMENT_BY_ROW);
符合[04-Feb-2016 17:15:35 Europe/Athens] PHP Warning: oci_fetch_all(): ORA-01722: invalid number
我得到的结果:choices
有人可以伸出援助之手吗?