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

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

问题描述

我用java编写代码并使用oracle连接数据库.我运行了一些脚本并得到这个错误.我的脚本在蟾蜍中工作但在我的项目中不起作用

网址包括.

<预><代码>....解码(REF.target_type_code,'1', wf.workflow_name,'20', reqtyp.request_type_name,'6', prj1.project_name,'59', trootinfo1.NAME,'55',解码(document.checked_out_by,空值,代替(代替(代替(代替(代替(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}'))) 参考细节,...

.

尝试{stmt = connection.createStatement();rset = stmt.executeQuery(url) ;} catch(例外e){错误= e.getLocalizedMessage() ;返回 4;}

此错误是由于 { } 括号引起的.我测试一下.当我删除括号时不会出错.但我需要它们,我该如何解决这个问题?

解决方案

都是关于 {}.你不使用它们.Ojdbc 不会解析它.使用不同的令牌代替它们.

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 include .

.
.
.
.
    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?

解决方案

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天全站免登陆