-138 The SUBSTRING argument is not valid.

Explanation

The second or third argument to the SUBSTR scalar function is not valid. Possibilities include:
  • The argument is NULL
  • The second argument is less than 1 or is greater than the maximum length of the first operand.
  • The third argument is less than 1 or is greater than the maximum length of the first operand minus the second operand.

User response

Correct the SQL statement.