这边是我的sql语句
Select a.*
From (select /*+first_rows*/
wi.iid as 顺序号,
w.wname as 案件类型,
i.name as 名称,
x.联系人 as 联系人,
wi.accepted_time as 接收时间,
wi.submit_time as 提交时间,
(Select user_name From st_user Where userid = wi.senduserid) as 前一用户,
wi.wiid,
wi.step as 所在岗位,
x.业务类型id as BusinessId
from ST_WORK_ITEM_HIST wi,
xt_instance x,
st_instance i,
st_workflow w
where wi.iid = x.iid
and x.iid = i.iid
and i.wid = w.wid
and wi.userid = :userId
and x.业务类型id in
(select id from sys_business_type b where b.type = :type)
order by wi.accepted_time desc) a
Where rownum <= 10
type这个变量在哪里定义的?
(select id from sys_business_type b where b.type = :type)
换成具体的值,不用type变量看看是否报错。
那个代码 :type用具体的值 删掉也是报同一个错
今天碰到一个很普通的问题:ORA-01008:并非所有的变量都已绑定,看着错误的提示,总以为是自己的变量和值不是对称的,检查了很多遍,后来,突然想起可能是因为变量的值是null造成的,而并非值和和变量没有一一对应。经检查发现,确实有一个值是null,不是空格,然后把值改成空格,就好了。
分析执行计划的话,:换成&试试,应该就可以过去了