Proc对join的支持问题
来源:互联网 发布:淘宝累计销量没有了 编辑:程序博客网 时间:2024/06/05 15:41
自己在使用proc的过程中,发现使用join的时候会报语法错误,例如:
“PCC-S-02201, 出现符号 "left"在需要下列之一时:
; , for, union, connect,
group, having, intersect, minus, order, start, where, with,
”
经过网上搜索,应该是老版本的proc不支持该语法的原因,在11g之后是支持ANSI 99的SQL语法的,之前版本的,可以通过动态语句来变通实现。
“
问:Is it possible to use INNER JOIN's with Pro*C? I'm currently getting this error:
INNER JOIN t_diagnosis b ON a.sak_diag = b.sak_diag
PCC-S-02201, Encountered the symbol "INNER" when expecting one of the following:
; , for, union, connect, group, having, intersect, minus,
order, start, where, with,
The query runs fine via SQL Developer. My version of Pro*C is Pro*C/C++: Release 10.2.0.3.0.
Thanks,
Matthew
答:Unfortunately the Pro*C precompiler does not understand "new" syntax/keywords... this falls into the same category as using analytics discussed here:
http://forums.oracle.com/forums/thread.jspa?threadID=664180&tstart=0
You would need to use dynamic sql as described in the programmer's guide to do this.
Support for all the ANSI 99 sql syntax (including joins) has been added in 11gw ith the new precompiler option common_parser. You can precompile your proc program containig join sqls as follows:
proc common_parser=yes proc_file.pc
For release 10.2 and earlier you would to workaround by using dynamic sqls as Mark suggested
”
在Proc(Release 10.2.0.1.0)中是没有common_parser这个选项的,
但是在Proc(Release 11.2.0.1.0)就有:
选项名称 当前值 说明
common_parser 否 使用 Common SQL Front End 进行语法分析
- Proc对join的支持问题
- Pro*C对inner join的支持情况
- 对/proc/buddyinfo的解释
- 对/proc/buddyinfo的解释
- 对/proc/buddyinfo的解释
- komodo对中文的支持问题
- Ninject对Web Api的支持问题
- 关于Robolectric对JNI的支持问题
- proc文件系统-z(非常棒的对proc的描述)
- BIRT是否完善支持对存在Computed Column的Join Data Set生成Cube/Cross Table?
- 对/proc编程的一点总结(转载)
- 对/proc/buddyinfo的理解(转载)
- 对 proc 文件系统的分析(一)
- 对/proc和/sys的一些理解
- MySQL:对join的理解
- 多线程join的问题
- Java 7的并行支持:Fork/Join
- Java 7的并行支持:Fork/Join
- Windows中OSG环境搭建
- vs2005编译Cocos2d-x,当前最新版本cocos2d-2.1rc0-x-2.1.3
- 高并发服务器的设计--缓存的设计
- sdut2500 0\'s 阶乘相关
- DNS解析过程详解
- Proc对join的支持问题
- .vcxproj 降级到 .vcproj
- 参加 dinner 的 注意点
- 对于开源Jeecg框架的了解及建议
- QTE中如何支持GIF、JPEG等格式图片
- nyoj28 大数阶乘
- MD5加密,并转换为16进制
- Windows 8 拿下4.27%,逆袭啦
- IE10占有率逼近两位数