114
Chapter 8 Accessing Data Sources
To change the type of SQL statement:
1
Open SQL Builder.
For instructions, see the opening SQL Builder procedure earlier in this section.
2
Select a statement type from the SQL Builder toolbar.
Building a SELECT statement
SQL SELECT statements let you specify data from which to build a recordset.
To create a SELECT statement:
1
Open SQL Builder.
For instructions, see the opening SQL Builder procedure earlier in this section.
2
Select a table to query.
3
Do one of the following:
•
To add a table to the query, right-click in the Table pane and select Add Table,
or click the Add Table button in the toolbar.
•
To create a join between tables, drag a column name between tables.
•
To delete a join, or to make it an inner or outer join, right-click the join and
select the appropriate command.
4
Drag the columns to display onto the Column section of the Properties pane.
5
(Optional) Set additional query attributes in the Properties pane.
6
Save the query or insert it into a page.
To use a variable in a SQL WHERE clause:
1
Open SQL Builder.
For instructions, see the opening SQL Builder procedure earlier in this section.
2
In the Properties pane, click in the row for a column, in the Criteria column.
3
In the Select box, select a variable syntax.
4
Double-click on a variable placeholder name and enter a value.
To save a query:
1
Open SQL Builder.
For instructions, see the opening SQL Builder procedure earlier in this section.
2
On the Query toolbar, click the Save Query button.
3
In the dialog box that appears, enter a name for the query.
4
Click Save.
Saved queries are stored on the database
server
. They can be edited and used by
anyone who has access to the server.
Содержание ColdFusion Server 5
Страница 18: ...xviii About This Book...
Страница 26: ...8 Chapter 1 Setting Up the Product...
Страница 42: ...24 Chapter 2 Configuring Browsers and Servers...
Страница 60: ...42 Chapter 3 Exploring the Workspace...
Страница 100: ...82 Chapter 6 Editing Pages...
Страница 126: ...108 Chapter 7 Using Web Development Languages...
Страница 212: ...194 Chapter 13 Customizing the Development Environment...
Страница 320: ...302 Glossary...