Using MSSMS I'm trying to run the query.
SELECT CONVERT(BINARY(16), 14437)
It results to:
0x00000000000000000000000000003865
But this is what I'm looking for:
0x65380000000000000000000000000000
I tried using reverse but no luck.
SELECT REVERSE(CONVERT(BINARY(16), 14437))
I tried using reverse but no luck.
REVERSE
returns a string. Casting back to binary returns your desired results
SELECT CONVERT(BINARY(16), REVERSE(CONVERT(BINARY(16), 14437)))
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