Has anybody run into this where the JDBC driver acts inconsistenly. We understand the inconsistency but there does not seem to be a pattern to the inconsistency. All we are trying to find out is the inconsistent pattern. We are TD 14.10 and using the 15.00 driver. Shown the query below. This works fine when using Teradata studio with the same driver I am using and also works fine with SQLA using ODBC and .NET connections. The bolded line is the problem. If we switch the Cast and Upper it works fine. We have a similar column from another table with the exact same column datatype (VARCHAR(255)) which works. There is nothing in this column which is different than the other column where it works on another table. Same database too and same connection strings.
The error is :
SQL state [HY000]; error code ; [Teradata Database] [TeraJDBC 15.00.00.20] [Error 3536] [SQLState HY000] UPPERCASE or CASESPECIFIC specified for non-CHAR data.; nested exception is java.sql.SQLException: [Teradata Database] [TeraJDBC 15.00.00.20] [Error 3536] [SQLState HY000] UPPERCASE or CASESPECIFIC specified for non-CHAR data.
Error 3536 is a Teradata Database error, not a Teradata JDBC Driver error, so this is not likely to be due to "inconsistent behavior" from the Teradata JDBC Driver.
It is more likely that you see different behavior when you use a different Transaction Mode, TMODE=ANSI versus TMODE=TERA.
You said that you are trying to find the reason for the behavior difference.
As I mentioned already, the behavior difference is likely due to you using different transaction modes in the successful cases versus the unsuccessful case.
You can execute the HELP SESSION command to determine which transaction mode you are using.