Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export binary to Text file; 0x converted to 00???

Status
Not open for further replies.

AndyHopper

Programmer
Jul 13, 2002
23
US
I'm migrating a web app from MSSQL server to Postgres and I've encountered a strange problem I can't seem to get around.

I export the data from my Microsoft server to a text file, everything work flawlessly with the exception of the image columns. It seems as though when the data is exporting 0x character sequences in the binary data is being written to the text file as 00 and corrupting all my binary data.

Sql server is also truncating the 0x which preceeds all the binary data.

Does anyone have any idea why SQL server is behaving this way?

Here's an example:

Data from Query Analyzer:
0x4011FBAD3BB6A2F74C9D04A8A494A529296493A4929FFFD9

Data in text file:
004011fbad3bb6a2f74c9d04a8a494a529296493a4929fffd9


Thanks in advance,
Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top