Friday, March 9, 2012

decimal to hex

Is there a way to create a SP or UDF that converts a decimal number to hexidecimal notation?run this in Query Analyzer

SELECT CAST(255 as varbinary)
SELECT CAST(10 as varbinary)
SELECT CAST(26 as varbinary)

cool eh?|||very nice, thanks!|||Can I stick something like this in a Formula field?
For example, say I have table Orders with columns OrderID (of type int) and OrderNumber.
I tried putting in the Formula (under "design table")

SELECT CAST(([OrderID] * 20) as varbinary)

but it apparently it doesn't work. Can I create something like this in the formula field?

No comments:

Post a Comment