• T-SQL type Int is storage-equivalent to VarBinary(4).

    T-SQL type BigInt is storage-equivalent to VarBinary(8).

    This is definitely not so, as varbinary require a VLB (Variable Length Block), whereas int and bigint does not. If they are storage-equivalent to something, that would be binary(4) and binary(8) respectively.

    Furthermore, I do not appreciate casts to variable length data without specifying the max length, even though it in your cases implicitly means varchar(30).

    Casting to varbinary does not convert it to hex, hex is a representation which may be used for displaying the data to the client.



    Ole Kristian Velstadbråten Bangås - Virinco - Facebook - Twitter

    Concatenating Row Values in Transact-SQL[/url]