如何解决此错误:不支持的SQL92? [英] How can I fix this error : non supported SQL92?

查看:1716
本文介绍了如何解决此错误:不支持的SQL92?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Java和与Oracle的数据库连接编写代码.我运行了一些脚本并收到此错误.我的脚本可以在Toad中使用,但不能在我的项目中使用

I wirte code in java and database connection with oracle. I run some script and get this error.My script work in toad but not work in my project

URL包括

.
.
.
.
    DECODE
                 (REF.target_type_code,
                  '1', wf.workflow_name,
                  '20', reqtyp.request_type_name,
                  '6', prj1.project_name,
                  '59', trootinfo1.NAME,
                  '55', DECODE
                     (document.checked_out_by,
                      NULL, 
                      REPLACE
                         (REPLACE
                             (REPLACE
                                 (REPLACE
                                     (REPLACE
                                         (knta_i18n_resource.get
                                             ('DMS_REFERENCE_DETAIL_CHECKED_OUT.TXT'
                                             ),
                                          knta_i18n_format_utils.format_date
                                                        (document.checked_in_date,
                                                         3 
                                                        )
                                         )
                                     ),
                                  document.version_number
                                 ) 
                             ),
                          '{4}' 
                         )
                     )
                 ) reference_detail,

.
.
.

.

try { 
    stmt = connection.createStatement(); 
    rset =   stmt.executeQuery(url) ;  
}  catch (Exception e) 

{  
    error= e.getLocalizedMessage() ;
    return 4; 
}

由于{}括号而发生此错误.我测试一下. 当我删除括号不要出错.但是我需要它们,我该如何解决?

this error occurs because of { } parentheses. I test it . When I delete parentheses dont error. But I need them and How can I fix this?

推荐答案

这一切与{}有关.您不使用它们. Ojdbc不会解析它.使用其他令牌代替它们.

It's all about { and }. You do not use them. Ojdbc won't parse it. Use different token instead of them.

这篇关于如何解决此错误:不支持的SQL92?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆