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 imported or was created using the SQL Wizard).
The Macro Editor 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.
If you are unfamiliar with SQL statements, it is a very good idea to build the statement and test it in a Database On-Demand session, and then copy and paste the statement into the Statement field. Then you can be sure that the syntax and content of your SQL statement are correct.
You can spread the SQL statement over several lines (as it appears
on the Review tab of a Database On-Demand session) 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 (see The basic macro format versus the advanced macro format). 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 zietest.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: