Converts a hexadecimal stream to its binary representation.
hexString is converted
to its binary representation, and the
varbyte result returned.
The optional second argument is a comma-separated string of any of the
stream: Only accept the
bintohex(), i.e. a stream of hexadecimal bytes, the same format that
convert(varbyteData, 'varchar')would have returned in Texis version 6 and earlier. Whitespace is acceptable, but only between (not within) hexadecimal bytes. Case-insensitive. Non-conforming data will result in an error message and the function failing.
pretty: Accept either
prettyformat data; if the latter, only the hexadecimal bytes are parsed (e.g. ASCII column is ignored). Parsing is more liberal, but may be confused if the data deviates significantly from either format.
hextobin() function was added in Texis version 7. Caveat:
Note that in version 7 and later,
convert()ing data from/to
varchar no longer converts the data to/from
hexadecimal by default (as was done in earlier versions) in programs
tsql; it is now preserved as-is (though truncated at
varchar). See the
hexifybytes SQL property
(here) to change this.