SQL Server Convert or Cast function
Posted on 2012-03-22
I am trying to convert a decimal into a hexadecimal string in a table. I can run the select query just fine (Select convert(varbinary(8), account) from accountTemp) but cannot run either an update on the table or a new insert to store the value permanently. (update accountTemp set account = convert(varbinary(8), account) -- OR -- Insert into account select convert(varbinary(8),account) from accountTbl
Any suggestions as to how I can have this be converted and stored into the table?