The IBM Technote "How to translate the unique identifier as displayed within FileNet Enterprise Manager so that it matches what is stored in the Oracle and DB2 databases" outlines how DB2 & Oracle store guids in a byte reversed order. How can I convert them into a friendly guid?
How can I translate the FileNet ID ID in DB2/Oracle into friendly GUID?
2.1k views Asked by Jeffrey Knight At
2
The following code does the trick in DB2, following the recipe from the IBM Technote:
The "cast as char(16)" is a gotcha - casting to varchar(16) does not work on DB2 at least.
Here's the before and after: