CHAPTER 4 Defining DataWindow Objects
DataWindow Designer User’s Guide 121
Using SQL Select
In specifying data for a DataWindow object, you have more options for
specifying complex SQL statements when you use SQL Select as the data
source. When you choose SQL Select, you go to the Select painter, where you
can paint a
SELECT statement that includes the following:
• More than one table
• Selection criteria (
WHERE clause)
• Sorting criteria (
ORDER BY clause)
• Grouping criteria (
GROUP BY and HAVING clauses)
• Computed columns
• One or more arguments to be supplied at runtime
Saving your work as a query
While in the Select painter, you can save the current SELECT statement as a
query by selecting File>Save Query from the menu bar. Doing so allows you
to easily use this data specification again in other reports.
For more information about queries, see “Defining queries” on page 145.
❖ To define the data using SQL Select:
1 Click SQL Select in the Choose Data Source dialog box in the wizard and
click Next.
The Select Tables dialog box displays.
2 Select the tables and/or views that you will use in the DataWindow object.
For more information, see "Selecting tables and views" next.
3 Select the columns to be retrieved from the database.
For more information, see “Selecting columns” on page 124.
4 Join the tables if you have selected more than one.
For more information, see “Joining tables” on page 126.
5 Select retrieval arguments if appropriate.
For more information, see “Using retrieval arguments” on page 129.