Is there any way to obtain an hexadecimal dump of a string in SQL Server? It'd be useful to troubleshoot character set and collation issues.
In MySQL you'd do SELECT HEX('€uro') and in Oracle you'd do SELECT DUMP('€uro') FROM DUAL.
SELECT CAST('€uro' AS VARBINARY(4))
Returns
  0x8075726F
On my default collation.
Edit. Just noticed the Unicode tag
SELECT CAST(N'€uro' AS VARBINARY(8))
Returns
 0xAC20750072006F00
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With