May 5, 2020 at 12:00 am
Comments posted to this topic are about the item CASTing Binary Values
May 5, 2020 at 7:21 am
The same:
SELECT 0x00006B61+0
May 5, 2020 at 3:45 pm
I hope, this will be not the next Question of the Day, but sometimes you have the value not in a binary column but in a VARCHAR (e.g. because you imported it from an CSV).
In this case:
SELECT CAST(0x00006B61 AS INT) -- value is already a binary
, CAST(CONVERT(BINARY(4), '0x00006B61', 1) AS INT) -- value is a varchar with leading 0x followed by a hex code
, CAST(CONVERT(BINARY(4), '00006B61', 2) AS INT) -- value is a varchar without leading 0x (only the hex code)
will do the job...
God is real, unless declared integer.
May 5, 2020 at 4:53 pm
Maybe you should write a few questions, Thomas ๐
May 5, 2020 at 10:26 pm
oh, I did already - about 20 questions ๐
God is real, unless declared integer.
May 6, 2020 at 9:17 am
Nice question, thanks Steve
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
โlibera tute vulgaris exโ
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply