about the complex sql of jdbc [message #77195] |
Thu, 04 November 2004 09:39 |
Tracychan
Messages: 2 Registered: November 2004
|
Junior Member |
|
|
I wonder if I can use IN predicate as subsql in Jbuilder. Cause I try all kinds of query, they can work. But if it has IN predicate, it can't work, and catch a error:
java.sql.SQLException: ORA-00600: internal error code, arguments: [[ttcgcshnd-1]], [[0]], [[]], [[]], [[]], [[]], [[]], [[]]
my source code is as following:
public static void query (Connection c) throws Exception {
Statement s1 = c.createStatement();
ResultSet r_s1;
try {
String sql = "select descriptionname ";
sql = sql + "from test.descriptionidname ";
sql = sql + "where descriptionid in ";
sql = sql + " (select descriptionid ";
sql = sql + " from test.description)";
r_s1 = s1.executeQuery(sql);}
catch (Exception e) {
e.printStackTrace();
}
}
But if without the IN subsql, it can work.
If anyone enconters this kind of problem? would you please give me the solution. It's very important to my system, since all my queries are this kind of complex sql.
THANKS !
|
|
|
|