Using SQL Select
126 DataWindow .NET
❖ To edit the SELECT statement:
1 Select Design>Convert to Syntax from the menu bar.
DataWindow Designer displays the
SELECT statement in a text window.
2 Edit the
SELECT statement.
3 Do one of the following:
• Select Design>Convert to Graphics from the menu bar to return to the
Select painter.
• Click the Return button to return to the wizard if you are building a
new DataWindow object, or to the DataWindow painter if you are
modifying an existing DataWindow object.
Joining tables
If the DataWindow object will contain data from more than one table, you
should join the tables on their common columns. If you have selected more
than one table, DataWindow Designer joins columns according to whether they
have a key relationship:
• Columns with a primary/foreign key relationship are joined automatically.
• Columns with no key relationship are joined, if possible, based on
common column names and types.
DataWindow Designer links joined tables in the Select painter Table Layout
view. DataWindow Designer joins can differ depending on the order in which
you select the tables, and sometimes the DataWindow Designer best-guess join
is incorrect, so you may need to delete a join and manually define a join.
❖ To delete a join:
1 Click the join operator connecting the tables.
The Join dialog box displays.
2 Click Delete.
❖ To join tables:
1 Click the Join button in the PainterBar.
2 Click the columns on which you want to join the tables.
3 To create a join other than an equality join, click the join operator in the
Table Layout view.