select gid
from t_grp_org
where nodepath like '%(select gid from t_grp_org where gname = '北京')%'
错误提示ORA-00907:缺少右括号问题sql如上,
我的解析如下
(select gid from t_grp_org where gname = '北京')结果正常为657232select gid
from t_grp_org
where nodepath like '%657232%')则结果正常所以我分析是sql执行顺序导致,希望能够调节格式实现
from t_grp_org
where nodepath like '%(select gid from t_grp_org where gname = '北京')%'
错误提示ORA-00907:缺少右括号问题sql如上,
我的解析如下
(select gid from t_grp_org where gname = '北京')结果正常为657232select gid
from t_grp_org
where nodepath like '%657232%')则结果正常所以我分析是sql执行顺序导致,希望能够调节格式实现
解决方案 »
- 怎样根据现存的用户权限创建角色?就是怎样把用户user的权限建成角色?
- 初学Oracle求个简单的触发器 在线等
- 请问在存储过程使用游标时运行效率通常怎么样?
- 为什么我建立了表,但是不给访问呢?
- 问三个Oracle的基本问题,先谢了!
- 每次启到计算机后,我在进程里发现了三个orcal.exe进程,我现在不想让他每次自到运行,该怎样设置?
- 我不小心删了一批数据,而且commit了,怎么把数据找回来?
- 请问如何把一个用户建的表导到另外一个用户里
- 关于备份/还原数据库的问题
- Oracle Change Notification 延时严重怎么解决?
- ORACLE数据库,存储过程需要返回一个二维数组,请问应该怎么写
- 关于oracle11g R2的 OS认证(在线等待,100分)
from t_grp_org
where nodepath like '%'|| (select gid from t_grp_org where gname = '北京' and rownum=1) ||'%'
from t_grp_org
where nodepath like '%'+(select gid from t_grp_org where gname = '北京')+'%'刚试了下,这样没问题
from t_grp_org
where nodepath like '%'|| (select gid from t_grp_org where gname = '北京' and rownum=1) ||'%'
from t_grp_org
where nodepath like '%' || (select gid from t_grp_org where gname = '北京') || '%'select m.gid
from t_grp_org m , (select gid from t_grp_org where gname = '北京') n
where m.nodepath like '%' || n.gid || + '%'select m.gid
from t_grp_org m , (select gid from t_grp_org where gname = '北京') n
where instr(n.gid , m.nodepath) > 0
FROM employees
WHERE first_name LIKE '%' || (SELECT first_name FROM employees WHERE employee_id = 1) || '%';
结果正常。
from t_grp_org
where nodepath like '%' || (select gid from t_grp_org where gname = '北京') || '%'变量与常量之间用 || 进行连接