"Adam" <ad**@blah.co m> wrote in message
news:7D******** ************@ne ws20.bellglobal .com...
Hello,
I'm trying to decifer the data in the table that stores the data in the
binary format. All numbers are placed in varbinary fields. All I know is
the
MS SQL 2000 database useing collation SQL_Latin1_Gene ral_CP1_CI_AS
(default).
For example the content of the field is:
(0xB4F500000000 0000) in unicode and defined as varbinary(8).
Are there any procedures that convert the unicode binary (or hexa) numbers
back to ascii or readable form?
I tried as following but it didn't work.
select cast(0xB4F50000 00000000 as decimal(8,2))
Any help is appreciated,
Adam
I'm not sure I follow your description, but in any event, if you remove the
trailing zeroes, then you can convert to an int:
select cast(0xB4F5 as int)
That could be a valid Unicode character:
http://toni.technetium.be/ascii/unicode.php?nr=180
So if you have the appropriate language support installed in your client,
you may be able to do this:
select nchar(cast(0xB4 F5 as int))
See NCHAR() and UNICODE() in Books Online. If this doesn't help, you might
want to clarify what you're looking for, and what you understand the binary
data represents - is every column value a single Unicode character, for
example?
Simon