Sql server conversion to in -
i have query works. 1 field in query is:
hashbytes('md5', table1.field1 + table1.field2 + table1.field3) out_name this gave wierd looking string. want have 32 bit hex string tried surrounding hashbyte calculation (from suggesting in sqlserver newsgroup)
convert(varchar(32), the-hashbyte-stuff, 2) out_name. i tried (this worked elsewhere in query)
substring(master.dbo.fn_varbintohexstr(the-hashbyte-stuff), 3, 32) out_name both of gave errors in converting varchar int.
i tried converting each piece int hashbytes varchar or nvarchar , still got errors in pieces -- though 1 without conversions -- plain hashbytes -- worked. tried cast, still had errors.
why does
convert(varchar(32), something-that-works, 2) fail -- , conversion int?
sql sql-server
No comments:
Post a Comment