gpt4 book ai didi

java - ora-03001 在 java 中运行 select 时未实现的功能

转载 作者:行者123 更新时间:2023-12-01 13:20:19 25 4
gpt4 key购买 nike

当我收到错误代码时,我尝试从 java(使用瘦驱动程序)在 oracle 11g 上运行以下选择查询。我的问题是为什么我会收到此错误?我认为这一定是瘦驱动程序的问题,但我无法弄清楚它可能是什么,因为它确实支持选择查询...请帮助我!

java.sql.SQLException:ora-03001 未实现的功能

ora版本:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production"
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

查询是:

    query = "select e.eq_nr as \"Eqiptmentnummer\", f.file_name as \"Dateiname\" e.adress as \"Adresse\","
+ " e.city as \"Ort\", e.county as \"Bundesland\", e.zip_code as \"PLZ\","
+ " e.manufacturer as \"Hersteller\" f.doc_info as \"DOC INFO\""
+ " from elevators e join files f on(e.eq_nr = (select eq_nr from file_links where file_id = f.file_id))";

使用preparedStatement和executeQuery:

PreparedStatement ps = c.getCon().prepareStatement(query);
ResultSet rs = ps.executeQuery();

我在 sql Developer 中运行了这个查询,它给了我这个输出(所有电梯及其相关文件),这是正确的:

eq_nr | file_name     |      adress    | city  |county| zip  |manufaturer|  note
1000 testname1.pdf somestreet 12 Vienna Vienna 1200 OTIS test insert brown 1
1000 testname2.pdf somestreet 12 Vienna Vienna 1200 OTIS test insert brown 2
1000 testname4.pdf somestreet 12 Vienna Vienna 1200 OTIS test insert brown 4
1001 testname.pdf somestreet 123 Vienna Vienna 1200 KONE test insert brown
1001 testname3.pdf somestreet 123 Vienna Vienna 1200 KONE test insert brown 3
1001 testname5.pdf somestreet 123 Vienna Vienna 1200 KONE test insert brown5
1001 testname6.pdf somestreet 123 Vienna Vienna 1200 KONE test insert brown 6

asd 从电梯中选择*:

elevator id|         adress        | city | county | zip  | manufacturer
1000 somestreet 12 Vienna Vienna 1200 OTIS
1001 somestreet 123 Vienna Vienna 1200 KONE

从文件中选择*:

[FILE_ID]  [FILE_NAME]  [FILE_PATH]     [FILE_TYPE] [LAST_CHANGED]         [ARCHIVE_FLAG][DOC_INFO]
77 [testname.pdf] [C:\testname.pdf] [pdf] 27.02.14 19:08:39,720000000 0 [test insert brown]
987 [testname1.pdf] [C:\testname1.pdf] [pdf] 27.02.14 19:08:55,195000000 0 [test insert brown 1]
76523 [testname2.pdf] [C:\testname2.pdf] [pdf] 27.02.14 19:09:09,735000000 0 [test insert brown 2]
123323 [testname3.pdf] [C:\testname3.pdf] [pdf] 27.02.14 19:09:35,912000000 0 [test insert brown 3]
1232 [testname4.pdf] [C:\testname4.pdf] [pdf] 27.02.14 19:09:49,219000000 0 [test insert brown 4]
8888212 [testname5.pdf] [C:\testname5.pdf] [pdf] 27.02.14 19:10:08,267000000 0 [test insert brown5 ]
5678 [testname6.pdf] [C:\testname6.pdf] [pdf] 27.02.14 19:10:22,213000000 0 [test insert brown 6]

从文件链接中选择*:

eq_ nr     file_id  valid
1000 76523 0
1000 1232 0
1000 987 0
1001 5678 0
1001 8888212 0
1001 123323 0
1001 77 0

最佳答案

这可能只是复制粘贴问题。在您发布的每个查询中,您都缺少一个逗号

f.file_name as \"Dateiname\" e.adress as \"Adresse\",

但上面的编辑没有。

f.file_name as \"Dateiname\", e.adress as \"Adresse\",

有这么简单吗? ;)

关于java - ora-03001 在 java 中运行 select 时未实现的功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22077892/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com