Hi Techies,
I have column called "UserAccessBit" with VarBinary(max) datatype. Now i would like to perform SUM operation on that column.see the following sample
select SUM(AccessBit) from UserAccess
Ex :
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
But I'm getting error that can not perform sum operation on varbinary column.
Note : i can not convert to int/Bigint because my varbinary value is bigger than bigint datatype.
Please help on this. Is there any user defined function to do sum .
Regards,
Rama