How can a parse a varbinary(max) field that contains an array of Int in hex value?
Posted on 2010-01-06
I have a varbinary(max) column in my SQL Server 2005 table that has an array of Int values stored in it.
Example when displayed via sys.fn_varbintohexsubstring function:
0x0000006d0000002b00000045 which when converted to Int is
0000006d = 109
0000002b = 43
00000045 = 69
I need to take the column, parse it and convert it to Int values for updating another table. Can someone point me in the right direction? I assume that using the Substring function would work, then using the Convert function, but I have not been able to get it working correctly. I am new to T-SQL and SQL Server and have been banging my head against the computer trying to get the parsing to work correctly.