Query Options

Restriction: This topic applies to Windows environments only.

Query options are divided into two types: Query Design options, and Query Run options.

Query Design Options

These options control how your Query Design window appears, and how SQL is generated.

Define Query
3-Part Names If checked, uses fully qualified table names in queries. If you get X28 errors, you should try checking this box.
2-Part Names If checked, qualifies names with AuthID.
Unqualified Names If checked, does not qualify names.
Show Table Names
If checked, adds a row to the Query Conditions Grid to show the name of the table from which a column comes.
Note:


Show Table Names button
Click the Show Table Names button to display the name of the table from which a column comes.

Auto Join Defaults
These options indicate the rules the system should use when automatically defining join conditions.
Join on Foreign Keys If checked, automatically joins all columns involved in a foreign key relationship when the referenced and referencing tables appear in the Table Display Area of the Query Design window. This method of auto joining produces good results, since foreign keys are built on columns that are meant to be joinable.
Join on Primary Key With Like Names If checked, automatically joins a primary key column with a column (or collection of columns) having the same name(s) in another table, provided both tables appear in the Table Display Area of the Query Design window. This method can result in some unintended joins if the primary key column name is a common name like CITY.
Join on Like Names If checked, automatically joins a column with another column of the same name in another table, provided both tables appear in the Table Display Area of the Query Design window. This option should be used with care. It is frequently the case that columns that should not be joined have the same name as another column in a different table. If you use this option, you should carefully check each join that is generated automatically to make certain it is meaningful.
Prohibit Cartesian Products
If checked, looks for any queries that are executed from within this program to determine if they will yield Cartesian products.

Query Run Options

These options take effect when a query executes.

Execute
Only one of these options can be enabled at a time.
All Commands If enabled, executes every command in the current SQL Edit window or .SQL script. If Step Mode is on, you have to use the Query menu Continue command to execute each step.
First Command If enabled, executes only the first command in the SQL Edit window or .SQL script.
Current Command If enabled, executes the command at the current cursor location if bounded by semicolons.
Default Result View
These options indicate if you want the default view for a result window to be a Result Table view (like a spreadsheet, showing multiple records at one time), or a Result Form view (shows one record at a time, with the fields arranged vertically). This option defines the default. You can switch to the other view at any time before or after a query is executed.
Edit Options
Allow Editing If a query result can be edited, signals the system to go directly to edit mode. If a result cannot be edited, it has no effect and the Allow Editing option is grayed out.
AutoCommit If a query result can be edited, indicates that the system should perform an automatic commit each time a record is updated, deleted, or inserted.
Max Records to Retrieve
You can limit run away queries by checking the First n Recordoption, and providing a reasonable value for n. Otherwise, every row has the potential of being retrieved. Note that SQLWizard tries to be intelligent when retrieving results. If you do not try to look at or otherwise access all of the rows in a result, it does not fetch all of them. However, if you perform a count, or if you print the result, or scroll to the bottom of the result, all rows will be retrieved, which could take some time depending on the query.