阅读:2944
回复:4
|
[求助]业务服务 sql中的变量 接收不到 传入的值
[img]file:///C:\Users\qiancheng\Documents\Tencent Files\992616726\Image\C2C\Image1\F[]J(P{(0K5JUK)3C0D`QU7.png[/img][img]file:///C:\Users\qiancheng\Documents\Tencent Files\992616726\Image\C2C\Image1\F[]J(P{(0K5JUK)3C0D`QU7.png[/img]select y.boardroomno,y.peoplenumber,y.style,y.facilitiesexplain from i_hq01_hysgl y where y.boardroomno not in (
select h.boardroomno from (select t.* from i_hq01 t left join ot_instancecontext ot on t.objectid = ot.bizobjectid where ot.state != '5') tt right join i_hq01_hysgl h on tt.hys = h.boardroomno where tt.kstime > to_date(:kstime,'yyyy-mm-dd hh24:mi:ss') and to_date(:jstime,'yyyy-mm-dd hh24:mi:ss') > tt.jstime ) 在集成日志中 显示的sql 异常信息是: select y.boardroomno, y.peoplenumber, y.style, y.facilitiesexplain from i_hq01_hysgl y where y.boardroomno not in (select h.boardroomno from (select t.* from i_hq01 t left join ot_instancecontext ot on t.objectid = ot.bizobjectid where ot.state != '5') tt right join i_hq01_hysgl h on tt.hys = h.boardroomno where tt.kstime > to_date(:kstime, 'yyyy-mm-dd hh24:mi:ss') and to_date(:jstime, 'yyyy-mm-dd hh24:mi:ss') > tt.jstime) ORA-01008: not all variables bound 请问一下 怎么解决这个问题 本身sql 是没有问题的 不给变量的时候 直接写成 select y.boardroomno,y.peoplenumber,y.style,y.facilitiesexplain from i_hq01_hysgl y where y.boardroomno not in ( select h.boardroomno from (select t.* from i_hq01 t left join ot_instancecontext ot on t.objectid = ot.bizobjectid where ot.state != '5') tt right join i_hq01_hysgl h on tt.hys = h.boardroomno where tt.kstime > to_date('2007-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2016-09-07 00:00:00','yyyy-mm-dd hh24:mi:ss') > tt.jstime ) 是可以查出数据的! |
1楼#
发布于:2016-07-25 10:44
补充一下 : 我传入的参数的 格式 也是 2007-09-07 00:00:00 这个格式 就是sql没有接受到值
|
|