Determine the Datatype of Character Literals

You cannot declare the datatype of a character literal. SAP ASE treats character literals as varchar, except those that contain characters that cannot be converted to the server’s default character set.

Such literals are treated as univarchar. This makes it possible to perform such queries as selecting unichar data in a server configured for “iso_1” using a “sjis” (Japanese) client. For example:


Example of how Japanese text appears.

Since the character literal cannot be represented using the char datatype (in “iso_1”), it is promoted to the unichar datatype, and the query succeeds.