这是我创建的带参数视图createorreplaceviewtb_tmall_statistics_viewasselecta.TB_ALIPAYACOUNT,count(a.TB_ORDERNO)TB_ORDERNO,sum(a.TB_REALPAY)TB_REALPAY,sum(a.TB_PRODUCTNUMS)...
这是我创建的带参数视图
create or replace view tb_tmall_statistics_view as
select a.TB_ALIPAYACOUNT,count(a.TB_ORDERNO) TB_ORDERNO ,sum(a.TB_REALPAY) TB_REALPAY,sum(a.TB_PRODUCTNUMS) TB_PRODUCTNUMS
from TB_TMALLSTATISTICS a
where a.orderfrom = p_view_param.get_orderFromParam and a.tb_createordertime between p_view_param.get_startTimeParam and p_view_param.get_endTimeParam group by a.TB_ALIPAYACOUNT;
调用视图
select * from TB_TMALL_STATISTICS_VIEW t where
p_view_param.set_orderFromParam('1') and
p_view_param.set_startTimeParam(to_date('2015/10/3 10:19:02','yyyy/MM/dd hh24:mm:ss')) and p_view_param.set_endTimeParam(to_date('2015/11/4 10:59:38','yyyy/MM/dd hh24:mm:ss')) 提示无效的关系运算符。这是什么原因?
请大神解惑!
展开