sql - Manually inserting a varbinary into table -
trying insert data varbinary(max) column manually using mssql:
begin insert [sometable]([varbinary]) values (0x255044462d312.....long varbinary(max).....ccb6ed46f9) end
however, when it's inserted heading 0 added(0x0255...) , trailing 9 removed(...46f_) when later try use contents corrupt.
can't figure out why happening.
try explicit converting:
convert(varbinary(max), '00001340132401324...', 2)
last parameter stays converting type. check out binary styles section here: https://docs.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql
Comments
Post a Comment