sql - Return binary as string, NOT convert or cast -


is there simple way (like convert or cast) return binary field string without converting or casting it?

the data want looks in database:

0x24fc40460f58d64394a06684e9749f30 

when using convert(varchar(max), binary_field), comes this:

$ü@fxÖc” f„étŸ0 

cast(binary_field varchar(max)) had same results.

i'm trying modify datasource in old vb.net application, want string existing values, still original data. don't have in query, i'd if possible avoid modifying old vb code much.

here select statement:

select strname, strdesc, binuuid   mytablename   intfamily = '1234'   order strname 

alternatively, if cast/convert it, safe compare "$ü@fxÖc” f„étŸ0" stored string @ later time value gathered in same way?

there built in function generate hex strings binary values

select sys.fn_varbintohexstr (0x24fc40460f58d64394a06684e9749f30) 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -