Running and Editing Queries

You can do a lot of work with SQL statements after building them.

Running a query

You can test your SQL code in SQL Builder before inserting it in a page.

Note To run a query in the SQL Builder:
  1. Click the Run Query button.

  2. You are prompted to enter values for any CFML variables in the query.
Note When you click the Run Query button, the SQL statement is actually processed. If you run an INSERT, UPDATE, or DELETE statement, the changes you coded in the SQL statement are made in the data source.

Editing queries

If you save a query, you can edit it later. Pages that contain the edited query are not automatically updated, so you will need to re-insert the query for the changes to take effect.

Note To edit a query:
  1. Open the query folder for the data source you want to use.
  2. Double-click on the query you want to edit.
  3. Make changes in the Table pane and the Properties pane.
  4. Save the new query.

Note

The interactions among the SQL Builder panes differ somewhat. If you write a query in the SQL pane and save it, the code is not reflected in the Properties or Table panes. If you take an action, such as adding a table, in the Properties or Table panes, the SQL pane is refreshed with the SQL generated from these panes.