All Forums Connectivity
ltt73 6 posts Joined 04/13
26 Apr 2013
JDBC - Converting from DB2 to Teradata

I'm just converting some Java JDBC code to use Teradata from DB2 - thought I would share a couple of things I found and ask for any other advice.
1) Remove "WITH UR" from your statements: DB2 supports uncommitted read in the syntax "WITH UR" at the end of a SQL statement, I guess Teradata does not recognize that syntax.
2) Upgrade to the latest drivers: prior to upgrading, I was having problems populating date fields using parameters in the SQL - after upgrading driver, these date problems disappeared. 
Do you have any other advice as I proceed with my project?

tomnolan 594 posts Joined 01/08
29 Apr 2013

Teradata does support the Read Uncommitted transaction isolation.
You can specify Read Uncommitted transaction isolation for the Connection by calling:
Or you can specify Read Uncommitted transaction isolation for a particular query by prefixing it with a LOCKING clause:
locking row for access select * from MyTable

ltt73 6 posts Joined 04/13
30 Apr 2013

Thanks tomnolan - I'm starting to see that converting my code from db2 will not be quite as easy as I had hoped.

You must sign in to leave a comment.