Quote function

Syntax

Quote(String)

Description

Use the Quote function to enclose a string in single quotation marks. This function also can be used to put quotation marks around SQL statements.

Parameters

Parameter Description

String

Specify the string you want to enclose in single quotation marks.

Returns

The string specified by String enclosed in single quotation marks.

Example

The following code returns 'Bob':

&QuotedString = Quote("Bob");

The following code returns 'Bob''s' (two single quotes to represent the apostrophe)

&QuotedString = Quote("Bob's");

The following code returns '%'' OR USER ID LIKE ''%':

&QuotedString = Quote("%' OR USERID LIKE '%");