Datasheet

6. Select the table named MenuItems, and click Add to add this table to the Diagram pane at
the top of the Query Editor window. Then click Close. In the list of columns that appears in
the Diagram pane, select the columns named
MenuItemType, ItemName, PizzaToppings,
and GraphicFileName
. You can either tick the checkboxes to add them to the grid, or drag and
drop them there. Notice how VWD creates the equivalent SQL statement in the section below
the grid, as shown in Figure 1-15.
Figure 1-15: Equivalent SQL statement
The Query Editor provides a range of ways to create and edit a database query. You can add tables to the
top section of the window, and then drag the columns you want to show into the Criteria grid in the
center of the window — where you also specify any filtering or sorting you want to apply to the rows.
Alternatively, you can, type (or copy and paste) a SQL statement directly into the lower section of
the Query Editor. This section, below the Criteria grid, shows the equivalent Transact-SQL (T-SQL)
commands used by VWD to fetch or update data when you execute the query. Below the SQL window,
right at the bottom of the central window, is another grid that displays the results of executing the
query or any error messages generated by the query.
14
Chapter 1
04_588079 ch01_2.qxd 4/19/06 8:55 AM Page 14