Previous Topic: Columns and KeysNext Topic: Literal Masking


Literal Value

If operand1 is a character column, the literal value for operand2 can contain any alphabetic or numeric character. If the literal value is not a number, it must be enclosed within apostrophes ('). The length of the literal cannot exceed the length of operand1. If the length of the literal is smaller, CA Dataquery adjusts the value to make the length of the literal the same as operand1 by padding with blanks to the right, the same as operand1.

If operand1 is a numeric column, the literal must contain numeric characters, which do not exceed the length of operand1, and a decimal point. The literal should not be enclosed within apostrophes ('). You can indicate a negative value by prefixing the literal with a minus sign (-).

If operand1 is a single-column key, the literal must conform to the structure of the column in the key and must be enclosed within apostrophes (').

Also, you can use literal masking to compare only portions of operand1 and operand2 to each other.

If operand1 is a multi-column or compound key, you can specify a literal value for each key column; however, if you specify only one value, CA Dataquery compares the literal value to the high-order column in the key. If you do specify a literal value for each key column, delimiters must separate each value. The entire literal must be enclosed within apostrophes ('). The following is a sample diagram for a literal for a multi-column key.

Note: A delimiter can be any character except a blank, the literal masking character, a dollar sign ($), a hyphen (-), the decimal point character, an apostrophe ('), a letter (a-z), a number from 0 to 9, the Kanji shift in character, or the Kanji shift out character.

'/lit1/lit2/lit3/'