encryption - How to optimize convertions in encrypted SQL Server database table -


i have encrypted database table , want select data calculations. lot of conversions needed , encrypt again update table. how can optimize query. sample query

select @total=cast(convert(varchar, decryptbykey([amount1])) numeric(12, 2))+ cast(convert(varchar, decryptbykey([amount2])) numeric(12, 2))*@percent table1  update table1 set [total]= encryptbykey(key_guid('key_67832'), convert(varchar,@total)) 

select cast(convert(varchar, decryptbykey([amount1])) numeric(12, 2)) amount1,        primarykey -- not sure if need this, added in case...   temptable   table1  select @total=amount1 + amount1 * @percent temptable  -- bit unchanged (so far) update table1 set [total]= encryptbykey(key_guid('key_67832'), convert(varchar,@total)) 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -