Hi,

The jOOQ parser should convert the following Postgres statement into an 
Oracle statement:
SELECT 123::text;


The resulting Oracle statement is
select cast(123 as clob)

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 CLOB*

In 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



-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to