This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Setting collation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Setting collation" Watch "Setting collation" New topic
Author

Setting collation

Simon Birch
Greenhorn

Joined: Dec 26, 2003
Posts: 21
I'm trying to merge data from a SQL server database with data from a DB2 database, and I've hit a snag. The DB2 database sits on a mainframe and sorts data in an EBCDIC based order (i.e. letters before numbers). The SQL database, and Java .compareTo() place numbers before letters.

I'd like to change the collation used by DB2 and I'm told that it can be done by providing a parameter on binding my SQL. I'm having some problems find out how to do this in Java though. Any help or pointers would be greatly appreciated.

We are using DB2 version 7, and SQL Server 2000.

A snippet of my current Java code:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting collation
 
Similar Threads
Arabic characters in MS sql
Problems retrieving utf8 encoded fields from mysql database
Order By in Query?
Import MS Access Database into DB2
collation conflict