Hi,
i was getting this error com.ibm.db2.jcc.b.SqlException: Invalid argument: unknown column name COL1 when trying to access my resultSet with rs.getString("COL1").
My SQL Query is: Select UPPER(COL1) from table1.
the same query and Java code is working fine with DB2 v8(Type 2 driver) but it is throwing the above exception when using with DB2 v9(Type 4 driver).
However i am able to resolve this error by adding an alias, modified query: Select UPPER(COL1) COL1 from table1.
the above query is working with both DB2 v8 and v9. does this mean, in DB2 9 we must provide an alias when using with functions like (upper,trim,..)???
thanks