SQL Query Wizard
Create SQL queries.
- Right-click the SQL Query field.
- Select SQL Query Wizard > Build Query from the right-click menu.
- Select Build Query
- The select statement is used to query the database and retrieve selected data that match the criteria that you specify. Here is the format of a simple select statement:
- The column names that follow the select keyword determine which columns will be returned in the results. Multiple column names can be queried.
- The table name that follows the keyword FROM specifies the table that will be queried to retrieve the desired results.
Build a SELECT clause
Using the following format: SELECT 'sqlschema.tablename.fieldname' FROM 'sqlschema.tablename'
- The Tablename dialog displays. Select the table, click Ok.
- The 'Field for SELECT clause' dialog displays. Select the field, click Ok.
- Fields in the SQL table are available.
Insert a WHERE Clause
The where clause (optional) specifies which data values or rows will be returned or displayed, based on the criteria described after the keyword WHERE.
- The 'Field for WHERE clause' dialog displays. Select the field, click Ok.
- The 'Comparison for WHERE clause' dialog displays. Select the field to compare, click Ok.
- The field is used to refine the results set to return values associated with the value selected in this field.
- Fields in the SQL table are available.
- The 'Type of Comparison' dialog displays. Select the comparison type, click Ok.
- If Specific Value is selected, the Specific Value dialog displays.
- Enter the value, click Ok.
- The 'Type of Comparison' dialog displays. Select the comparison type, click Ok.
Insert a SELECT Clause with CODE and VALUE
- The 'Code Field for SELECT clause' dialog displays. Select the code, click Ok.
- The 'Value Field for SELECT clause' dialog displays. Select the value, click Ok.
Check the SQL query for validity
-
Click Validate SQL Query
The SQL is verified that it complies the standard SQL syntax.
The Validate SQL Query button is enabled.
See Create SQL Queries for more information.
See SQL Reserved Words for a list of words that cannot be used in SQL table names.
