Use the SQL page of the SQL Assist SmartGuide to display the SQL statement for a Select or Modify bean.
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.
Schema qualified names
The schema qualified names checkbox allows you to include the schema name on tables and columns by selecting it. At runtime, you can use the same database and user ID you used to specify the statement, or another database and/or user ID. If the Schema qualified names checkbox is selected, the tables must be defined on the database where the statement executes, with the same schemas you specified. If the checkbox is not selected, the tables must be defined on the database where the statement executes, with a schema that matches the user ID you use to connect.
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 if one is returned from executing the SQL statement. .
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.
Specifying the tables for an SQL statement
Joining tables
Specifying search conditions
Specifying result columns
Sorting the result set
Remapping data to a different SQL data type