The LENGTH() function

Informix® provides the LENGTH() function:

SELECT LENGTH("aaa"), LENGTH(col1) FROM table 

Netezza® has a equivalent function with the same name, but there is some difference:

Solution

You must check if the trailing blanks are significant when using the LENGTH() function.

If you want to count the number of character by ignoring the trailing blanks, you must use the RTRIM() function: