logo  
Google
 

DB2 SQL-Error: -102

SQLState: 54002

Short Description: LITERAL STRING IS TOO LONG STRING BEGINS C SQL

The string constant beginning with string has a length greater than the maximum allowed length. Most strings have these limits: v For a hexadecimal constant (X, GX, or UX), the number of hexadecimal digits must not exceed 32704. v Any other character string constant must be short enough so that its UTF-8 representation requires no more than 32704 bytes. v Any other graphic string constant must be short enough so that its UTF-8 representation requires no more than 32704 bytes. v The sum of the lengths of the UTF-8 representations of the constant values in an ENDING AT clause must not exceed 765 bytes. This clause applies to CREATE TABLE, ALTER TABLE, CREATE INDEX, or ALTER INDEX.In some contexts, however, the limit is smaller; see the DB2 SQL Reference for the specific cases. For special registers, the allowable length depends on the particular special register. A string that exceeds the limit can be specified only through assignment from a host variable. If this release of DB2 increases the maximum allowed length of a string constant, then an attempt to exploit the new length before using the New Function Mode produces this SQL return code. Two consecutive string delimiters are used to represent one string delimiter within the character string, but these count as 2 bytes when calculating the lengths of character string constants. System action: The statement cannot be executed. Programmer response: The requested function is not available interactively. If the error occurred in the context of an SQL statement embedded in an application program, the desired result can be achieved by assigning the long string to a host variable, and

 <-  BACK TO INDEX