December 9, 2008 at 12:37 am
Hi,
plz see dis simple script. What's going wrong with the varbinary data while converting to float?? Here I used the built-in encryption-decryption functions in 2005 which returns varbinary.
Plz help
declare @a varbinary(100)
declare @b-2 varbinary(100)
declare @f float
set @f=123.456
set @a=EncryptByPassPhrase('vival', cast(@f as varbinary))
set @b-2=DecryptByPassPhrase('vival', @a)
print @b-2
print cast(cast(@b as decimal(10,4)) as float)
December 9, 2008 at 2:38 am
Please don't cross post. It just wastes peoples time and fragments replies.
No replies to this thread please. Direct replies to:http://www.sqlservercentral.com/Forums/Topic615953-1291-1.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply