Displaying the SQL statement

Use the SQL page of the SQL Assist SmartGuide to display the SQL statement for a Select bean.


SQL page of SQL Assist SmartGuide

After you display the SQL statement, you can copy it to the clipboard, run it as a test from the SQL page, or save it to a file.

Copying the SQL statement

Select Copy to clipboard to copy the SQL statement to the clipboard. The copied SQL statement is available for pasting into other windows such as the SQL Editor window.

Testing the SQL statement

Select Run SQL to execute the SQL statement. The SQL statement is run against the database specified in the currently selected connection alias for the Select bean. The result set is displayed in a separate window.


SQL Execution Result Set

From the SQL Execution Result Set window, you can:

Saving the SQL statement

Select Save SQL to save the SQL statement in a file. (You can also save the SQL statement from the SQL Execution Result Set window.) You are prompted for a file name and a save location.

You can edit any part of the SQL statement by selecting the appropriate page in the SQL Assist SmartGuide. Selecting Back displays the Mapping page. Use this page to remap columns in the result set to different SQL data types.

If the specification of your SQL statement is complete, select Finish. This generates the code for the SQL statement and closes the SQLAssist SmartGuide.

To cancel the visual composition of the SQL statement, select Cancel.