Advanced SQL Statement Dialog
The Advanced SQL Statement dialog is available by clicking the Edit SQL button from the Database Query action task. You can enter a custom SQL query in this dialog, using the language supported by the database you select in the Database Query action task.
The dialog is separated in two parts:
- The left part displays the available tables in your database. Click the Show Tables button to display them.
- The right part displays a default SQL statement which you can modify at your leisure.
- The bottom part displays the following options:
- Alternate syntax: Select to prevent automatically enclosing the names of any database tables and fields that appear in the SQL query in square brackets when it exits the Advanced SQL Statement dialog box. The alternate syntax may be required for some database types.
- Client-side Cursor: When this option is enabled, the complete result set is downloaded before processing starts, and changing records is done by PReS. This is generally faster for queries returning a small number of results ; otherwise the start of the record processing can be delayed since the whole record set must be downloaded.
MySQL, using ODBC 5.0, must be set to use a client-side cursor.
Microsoft Access will always work better when using a Server-Side cursor. - Expect record set: Check if you are expecting a result from the database after executing the SQL query. If the query is expecting a record set in return and does not return one, the task will trigger an error.
- Test SQL button: Verify the SQL statement's validity.