Previous Topic: Field to Field Comparisons

Next Topic: Search for Lowercase Data

Use &NDBQUOTE to Protect Special Characters

The &NDBQUOTE built-in function should be used to protect data values whenever there is the possibility of delimiter characters (for example, =, &) being present. This recommendation also applies to arguments supplied in a scan expression.

For example, to search for a value of A=B, use these statements:

&SCHARG = &NDBQUOTE A=B
&NDBSCAN MYNDB SEQ=S1 DATA FIELD1 = &SCHARG

Failure to quote the value results in a syntax error because the equal sign is treated as a delimiter.