Hi,
The jOOQ parser should convert the following Postgres statement into an Oracle statement:
The resulting Oracle statement is
Now I am trying to get the result:
ResultQuery<Record> resultQuery = null;
try {
resultQuery = (ResultQuery<Record>) DSL.using(conn, dialect).parser().parseQuery(sql);
ResultSet rs = conn.createStatement().executeQuery(queryStr);
while (rs.next())
System.out.println(rs.getString(1));
} catch (Exception e) {
System.out.println(String.format("%1$9s : ERROR ON PARSING: %2$s", dialect, e.getMessage()));
}
This works for SQLDialect.POSTGRES but not for SQLDialect.ORACLE:
ORA-00932 Inconsistent datatypes String and CLOBIn my opinion the TEXT casts should be better casted into varchar instead of CLOB. In that case it would work.
Is this a bug or a feature? :D