strtobin

Converts a sequence of alphanumeric characters to their equivalent hexadecimal digits.

Syntax

select strtobin(“string of valid alphanumeric characters”)

Parameters

Examples

Usage

  • Any invalid characters in the input results in NULL as the output.

  • The input sequence of hexadecimal digits must have a prefix of “0x”.

  • A NULL input results in NULL output.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute strtobin.

Related reference
bintostr