Hello,
I am trying your [very interesting] product and I think I have found a bug.
I have a table with columns FOO and BAR and I need to simulate a third column, BAZ, always having value NULL.
I issue the statement
PreparedStatement ps = c.prepareStatement("select foo, bar, NULL as baz from datetest");
I obtain the error
java.sql.SQLException: Can't parse select foo, bar, NULL as baz from datetest
!
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.b0.a(Unknown Source)
at com.hxtt.sql.b0.(Unknown Source)
at com.hxtt.sql.y.do(Unknown Source)
at com.hxtt.sql.ch.(Unknown Source)
at com.hxtt.sql.a3.prepareStatement(Unknown Source)
at com.hxtt.sql.a3.prepareStatement(Unknown Source)
at com.hxtt.sql.a3.prepareStatement(Unknown Source)
at Prova.main(Prova.java:36)
Exception in thread "main"
I think this is actually a bug, since in several other drivers and databases this is recognised as valid SQL.
Please note that
SELECT FOO, BAR, 1 AS BAZ FROM DATETEST
is working perfectly, as well as
SELECT FOO, BAR, '' AS BAZ FROM DATETEST
I deduce that the general mechanism for constant-valued columns is working correctly, and there is a tiny problem connected to the specific constant NULL.
My compliments for the product!
Andrea Spinelli
|
Supported. Please download the latest package. Thanks for your response.
|