Statement
Type or paste an SQL statement into the Statement field. If the Statement field already contains an SQL statement, you can edit it (even if the SQL statement was created using the SQL Wizard).
The AME does not check the format of the SQL statement for validity. If the format is invalid, a run time error occurs when the macro runtime processes the SQLQuery action.
You can spread the SQL statement over several lines or write it
all on one line. SQL statement
written on several lines and Same
SQL statement written on one line show the same SQL statement written over
several lines and written as one line. Either way is correct.
Remember that if you are using the advanced macro format you must
enclose the SQL statement in single quotes and follow the rules for
special characters. Below, SQL statement written for the
basic macro format and Same
SQL statement written for the advanced macro format show the same SQL statement written for the
basic macro format and for the advanced macro format:
You can use either upper case or lower case for reserved words
(such as
select
) and database names and fields (such as hodtest.ex01.descript
),
but you must use exact case for matching strings (such as 'Edit
Products'
). Thus the two SQL statements in Example of equivalent
upper case and lower case are equivalent: