String literals appear as a part of expressions. Provide commands for String literals.
String literals are also sometimes called character literals or text literals. When a string literal appears as part of AN expression in this documentation, it is indicated by the word TEXT. The syntax for single-line string literals is:
"character_string"
or
'character_string'
The syntax for multi-line string literals is:
[[character_string]]
In all cases, character_string is a combination of alphabetic characters, numeric characters, punctuation marks, spaces, and tabs.
A single-line string literal must be enclosed in single (' ') or double (" ") quotes.
Two adjacent quotes with no character string between represent an empty string.
Newline characters (either CR or NL) can only be used with the multi-line string syntax.
Note that, to include a single quotation mark (or an apostrophe) in a text string that is already surrounded by single quotes, you must enter the inside quotation mark twice. For example, to put the apostrophe in the word that's, use two apostrophe/single-quote characters in a row:
'And that''s the truth.'
Similarly, to put a double quote inside a string delimited by double quotes, use a pair of double quotes inside the string, for example:
"He said ""No!"""
Sybase CEP Engine treats the doubled characters as single characters in this situation.
Some examples of valid string literals are:
'abc123' 'abc 123' 'It''s a good idea.' "20030" "abc123" "abc 123" """What?"" he asked."
Internationalization impacts string literals. All the literals in the preceding list are 7-bit ASCII literals. But this:
'αβγ123'
is also a literal.