title: Perform aggregate operations on varbinary datatype sql server
body: <p>I need to perform aggregate functions on varbinary column in sql server. Snippet below gives me error that datatype varbinary(max) is invalid. </p>
  
  <pre><code>  DECLARE @vbtest TABLE(  
    al varbinary(MAX)  
    )
    insert into @vbtest values(0x0000000000000004)
    insert into @vbtest values(0x0000000000000006)
    insert into @vbtest values(0x0000000000000008)
    select sum(al) from @vbtest
  </code></pre>
  
  <p>is there any way to perform aggregate operations on varbinary datatype.</p>
  
  <p>Note : I can not convert to int/Bigint because my varbinary value is bigger than bigint datatype.</p>