In WHERE clauses of the SELECT statement, LONG VARCHAR columns can only be used in IS NULL and IS NOT NULL expressions, in addition to the BIT_LENGTH, OCTET_LENGTH, CHAR_LENGTH, CHAR_LENGTH64, SUBSTRING64, and SUBSTRING functions.
LONG VARCHAR columns cannot be used in the SELECT statement clauses ORDER BY, GROUP BY, and HAVING or with the DISTINCT keyword (SELECT DISTINCT and COUNT DISTINCT).
See “Function support of LONG VARCHAR data type” for more information on LONG VARCHAR data and functions.