Hello everybody,
I have a problem, my information in BD is encrypted. but i need to desencryte and convert to numeric and then get a SUM()
I'm trying to do it, eg
SELECT @TOT = SUM(cast(CAST(isnull(decryptbykey(TOT_TRAB_INCLUIDOS),0) as varchar(15)) as float)) from TABLE_XX
or
SELECT @TOT_Trabajadores = SUM(cast(CAST(decryptbykey(TOT_TRAB_INCLUIDOS) as varchar(15)) as float)) from TABLE_XX
This error show me: Operand data type varbinary(max) is invalid for sum operator.
Someone may i help me, please :(
Thks so much