阅读:2944 回复:4
15171162016
2

帖子

15

跟帖

684

积分

中级榴莲
中级榴莲
  • 社区居民

[求助]业务服务 sql中的变量 接收不到 传入的值

楼主#
更多 发布于:2016-07-25 10:39
[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 )


是可以查出数据的!
15171162016
2

帖子

15

跟帖

684

积分

中级榴莲
中级榴莲
  • 社区居民
1楼#
发布于:2016-07-25 10:44
补充一下 : 我传入的参数的 格式 也是 2007-09-07 00:00:00  这个格式  就是sql没有接受到值
tanw
1

帖子

35

跟帖

5872

积分

高级榴莲
高级榴莲
  • 社区居民
2楼#
发布于:2016-07-25 11:03
ORA-01008:并非所有的变量都已绑定
可能变量的值是null
15171162016
2

帖子

15

跟帖

684

积分

中级榴莲
中级榴莲
  • 社区居民
3楼#
发布于:2016-07-25 12:35
不可能是这个问题!变量的值 是我手动输入的!
tanw
1

帖子

35

跟帖

5872

积分

高级榴莲
高级榴莲
  • 社区居民
4楼#
发布于:2016-07-25 14:42
能否提供下 配置sql 方法页面生成的XML,里面是否有传入的参数
游客

返回顶部