SQL Genie


The SQL Genie creates SQL SELECT statements using Portable SQL.

  • As you make selections in the SQL Genie, you will notice that it always displays the latest version of the SQL SELECT statement in the SQL control.

  • You may directly edit the SQL statement in the SQL pane.

  • Any time that your SQL SELECT statement changes, you may click Execute Query to show the first 100 records returned in the Preview pane.

  • At any time you may click the History button to display SQL History dialog. This dialog allows you to revert to a previous version of your SQL SELECT statement.

There are six tabs in the genie.

  • Properties

    Define GROUPBY clauses.

    Define DISTINCT clauses.

    Set record ranges.

    Define Arguments.

  • Tables

    Select one or more tables.

    Define JOIN relationships between tables.

  • Columns

    Select fields from one or more tables.

  • Filter

    Define WHERE clauses that filter the records that you will retrieve.

  • Order

    Sequence the records that you will retrieve.

  • Having

    Define HAVING clauses that filter the records that you will retrieve only when using a GROUP BY clause.

Starting the SQL Genie

You can display the SQL Genie in the following ways:

  • In the Specify SQL SELECT Statement dialog click Query Builder... .

  • In the Database Explorer, select a back-end database listing, right click, and select Open Query Builder.

SQL History

The SQL History dialog displays a list of the SQL SELECT statements that you have created. as such, it represents a list of snapshots since you began defining the query for the current report.

To return to a previous version of the SQL SELECT statement, pick it from the list and click Select.

Native Syntax

The Native Syntax button displays the SQL Native Syntax dialog box. This dialog displays both the Portable SQL that has been generated by the SQL Genie and the native SQL version supported by any of these database products. The Copy to Clipboard button allows you to copy the native SQL for reuse in another context.

See Also