I have a table with same column title(not the column names), runing a SQL on it from Java is returing same values for both the columns, it is because of same column title, but same SQL in SQL Assitant returns correct values, where can i find and confirm if same title is reason. is there a driver documentation which states this behaviour.
Also, Did explict column alias in SQL used in java.. now results are correct. let me know.
It looks like there is some problem with SQL Assistant. Take a look at this: http://my.safaribooksonline.com/book/databases/sql
Hope this helps.
Thanks, im looking more from Java JDBC drive perspective, how resultset values are populated, if two columns has same title with different values. does value of first gets assigned to second as well. i know thats how its happening now.. just wanted to see the reference of this behaviour. or is it a bug in teradata jdbc driver.
Are you using ResultSet getter methods that have a columnName argument? If so, then it is expected that you will only be able to retrieve one of the column values if there are two columns with the same name.
Instead, use the ResultSet getter methods that have an integer columnIndex argument.