Trying to use the LENGTH function in a query against a Snowflake table might result in an incorrect query being passed to the database. This issue can result in slower performance because SAS, by default, reverts to doing the work itself rather than failing. SAS reads in the data and processes the portion of the query that could not be passed to the Snowflake database.
This issue occurs when the following is true:
A possible workaround is to use the LENGTHC function instead of the LENGTH function (with the understanding that the two functions can generate different results). The LENGTHC function is passed to the Snowflake database and returns the number of characters. The LENGTH function, however, returns the length in bytes.