SQLCODE -171
SQL0171 Argument of function not valid
- IBM message text
- Argument &1 of function &2 not valid.
- SQLCODE
- -171
- SQLSTATE
- 22014, 22016, 2201T, 2201V, 22546, 42815
Most common cause
Type, length or value of an argument the function does not accept (a number where a string is needed, a negative length).
Other causes
- An invalid regular expression in REGEXP_LIKE or REGEXP_REPLACE.
- A format not allowed in functions such as VARCHAR_FORMAT.
How to fix it
The message says which argument is wrong: fix its type or value, with a CAST if needed.
Related errors
Text and codes from IBM documentation for 7.6. Checked on .