[TD_SYSFNLIB.] SUBBITSTR ( target_arg, position_arg, num_bits_arg )
- Name of the database where the function is located.
- A numeric or variable byte expression.
- If target_arg is NULL, the function returns NULL.
- An integer expression indicating the starting position of the bit substring to be extracted.
- If position_arg is negative or out-of-range (meaning that it exceeds the size of target_arg), an error is returned.
- If position_arg is NULL, the function returns NULL.
- An integer expression indicating the length of the bit substring to be extracted. This specifies the number of bits for the function to return. Because the return value of the function is a VARBYTE string, the number of bits returned is rounded to the byte boundary greater than the number of bits requested.
- The bits returned is right-justified, and the excess bits (those exceeding the requested number of bits) are filled with zeros.
- If num_bits_arg is negative, or is greater than the number of bits remaining after the starting position_arg is taken into account, an error is returned.
- If num_bits_arg is NULL, the function returns NULL.