How can a parse a varbinary(max) field that contains an array of Int in hex value?

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.  
daileyanAsked:
Who is Participating?
 
pcelbaConnect With a Mentor Commented:
SELECT CONVERT(int, SUBSTRING(vbmax,1,4))  Col1, CONVERT(int, SUBSTRING(vbmax,5,4))  Col2,
     CONVERT(int, SUBSTRING(vbmax,9,4))  Col3, CONVERT(int, SUBSTRING(vbmax,13,4))  Col4
  FROM YourTable
0
 
f_o_o_k_yCommented:
0
 
daileyanAuthor Commented:
Thanks a lot.  That works great.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.