File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting collation

Simon Birch
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic