Software development stuff.

2007-05-31

Show an integer as hexadecimal in T-SQL

If you need to select an integer and show it as an hexadecimal value you can use a trick, cast it to binary because Sql Server Management Studio shows binary data as hexadecimal. Example:

select cast( 1454 as varbinary(2))

Etiquetas: