Previous Next Contents


Query Wizard

The query wizard allows you to create four types of queries to use in accessing and modifying the data in your database.

The query wizard enables you to create the following types of queries:

Related Topics

Initial Query
Description
The initial query wizard provides a starting point from which to create your first query.

This wizard includes the following steps:

Related Topic

Specify Base Name and Location
Description
Decide what to label the query and in which directory to store it.

Properties
Field
Value
Example
Name
Name of the query.
Insert
Directory
Directory in which to store the query.
C:\nab\apps\HelloWld\

Related Topic

Specify Data Model
Description
Specify the data model.

Properties
Field
Value
Example
Data Model
You can select a data model found in the current project from the pop-up list or click Browse to locate a data model found elsewhere.
MessageBoard.kdm
Create a new data model
Exit the wizard to create a new data model.

Related Topic

Initial Query Type
Description
Select which type of query to create first: Select Query, Insert Query, Update Query, or Delete Query.


Select Query
The select query wizard allows you to create queries to retrieve selected information.

This wizard includes the following tabs:


Name Tab
Description
Assign a name and description to the query.

Properties
Field
Value
Example
Query Name
Name of the query.
messgbrd
Description
(Optional) Description of the query.
Retrieves selected info from database

Related Topic

Fields Tab
Description
Select the fields to retrieve and display.

Properties
Field
Value
Example
Data Source
Data source from which you retrieve information.
ODBC
Table
Table within that data source from which you retrieve information.
chatMessages
Fields
Field(s) to display.
Message, AuthorID
>
Move selected fields to the Fields to Display column.

>>
Move all fields to the Fields to Display column.

<<
Remove all fields from the Fields to Display column.

<
Remove selected fields from the Fields to Display column.

Fields to Display
Listed fields are displayed.

Select Distinct
You can enable the checkbox to retrieve only unique instances of the search item (don't show duplicates).

Related Topic

Conditionals Tab
Description
Specify the conditions used to match rows in the database.

Properties
Field
Description
Example
Add Condition
Add a condition to the query. The Condition Properties dialog box appears.

Add And
Insert an "and" operator.

And Or
Insert an "or" operator.

Edit
Modify the condition. The Condition Properties dialog box appears.

Remove
Remove a selected condition.

Conditions
Conditions you specified.
chatUsers.UserId=UserId

Related Topic

Condition Properties
Description
Select the tables and fields to conditionalize.

Properties
Field
Value
Example
Table
Table from which you retrieve information.
chatUsers
Field
Field to conditionalize.
UserId
Operator
Operator used in the condition.
=
Values
Required value.
UserId
OK
Complete the condition.

Related Topic

Sorting Tab
Description
Specify the order in which retrieved data is organized by creating a sort key.

Properties
Field
Value
Example
Fields
You can select one or more fields to use as a sort key.
OBAccount.ssn
>
Move selected field(s) to the Sorted Fields column.

<
Remove selected field(s) from the Sorted Fields column.

<<
Remove all fields from the Sorted Fields column.

Sorted Fields
Fields by which to sort.
(A-Z)OBAccount.ssn
A-Z
Sort the selected field in ascending order.
(A-Z)OBAccount.ssn
Z-A
Sort the selected field in descending order.
(Z-A)OBAccount.ssn

Related Topic

Joins Tab
Description
Define how queries relate to each other by adding joins.

Properties
Field
Value
Example
Join
You can select an operator from the drop-down list.
chatUsers.UserId=chatMessages.AuthorId

Related Topic

SQL Tab
Description
An editable preview of the SQL code appears. The code is the result of your selections on previous tabs.

Related Topic

Results Tab
Description
View the query you have created.

Properties
Field
Description
Execute SQL button
Run the code generated from selections made on previous tabs. The Execute SQL dialog box appears.
Execute SQL dialog box
You can select a driver and data source from the drop-down lists. Enter your user name and password.
New Login
You can enable the checkbox to change users.
Results
Data that results from executing the SQL code.

Related Topic

Insert Query
The insert query wizard allows you to create queries to add specific information to your database.

This wizard includes the following tabs:


Name Tab
Description
Assign a name and description to the query.

Properties
Field
Value
Example
Query Name
Name of the query.
messgbrd
Description
(Optional) Description of the query.
Adds selected info to database

Related Topic

Fields Tab
Description
Specify the fields to update or insert.

Properties
Field
Value
Example
Data Source
Data source to which you insert information.
ODBC
Table
Table within that data source to which you insert information.
chatMessages
Value
Values for the columns to insert into the table.

Related Topic

SQL Tab
Description
An editable preview of the SQL code appears. The code is the result of your selections on previous tabs.

Related Topic

Results Tab
Description
View the query you have created.

Properties
Field
Description
Execute SQL button
Run the code generated from selections made on previous tabs. The Execute SQL dialog box appears.
Execute SQL dialog box
You can select a driver and data source from the pop-up lists. Enter your user name and password.
New Login
You can enable the checkbox to change users.
Results
Data that results from executing the SQL code.

Related Topic

Update Query
The update query wizard allows you to create queries to modify specific information in your database.

This wizard includes the following tabs:


Name Tab
Description
Assign a name and description to the query.

Properties
Field
Value
Example
Query Name
Name of the query.
messgbrd
Description
(Optional) Description of the query.
Modifies selected info in database

Related Topics

Fields Tab
Description
Enter the values for the columns to modify.

Properties
Field
Value
Example
Data Source
Select the data source in which to modify information.
ODBC
Table
Table within that data source in which to modify information.
chatMessages
Fields
Values for the columns to update.
Message, AuthorID

Related Topic

Conditionals Tab
Description
Specify the conditions that used to match rows in the database.

Properties
Field
Description
Add Condition
Add a condition to the query. The Condition Properties dialog box appears.
Add And
Insert an "and" operator.
And Or
Insert an "or" operator.
Edit
Modify the condition. The Condition Properties dialog box appears.
Remove
Remove a selected condition.
Conditions
Conditions you specify.

Related Topic

Condition Properties
Description
Select the tables and fields to conditionalize.

Properties
Field
Value
Example
Table
Table in which to modify information.
chatUsers
Field
Field to conditionalize.
UserId
Operator
Operator used in the condition.
=
Values
Required value.
UserId
OK
Complete the condition.

Related Topic

SQL Tab
Description
An editable preview of the SQL code appears. The code is the result of your selections on previous tabs.

Related Topic

Results Tab
Description
View the query you have created.

Properties
Field
Description
Execute SQL button
Run the code generated from selections made on previous tabs. The Execute SQL dialog box appears.
Execute SQL dialog box
You can select a driver and data source from the pop-up lists. Enter your user name and password.
New Login
You can enable the checkbox to change users.
Results
Data that results from executing the SQL code.

Related Topic

Delete Query
The delete query wizard allows you to create queries to delete specific information from your database.

This wizard includes the following tabs:


Name Tab
Description
Assign a name and description to the query.

Properties
Field
Value
Example
Query Name
Name of the query.
messgbrd
Description
(Optional) Description of the query.
Deletes selected info from database

Related Topic

Table Tab
Description
Select the data source and table within that data source from which you delete cells.

Properties
Field
Example
Data Source
OBDC
Table
chatMessages

Related Topic

Conditionals Tab
Description
Specify the conditions used to match rows in the database.

Properties
Field
Description
Example
Add Condition
Add a condition to the query. The Condition Properties dialog box appears.

Add And
Insert an "and" operator.

And Or
Insert an "or" operator.

Edit
Modify the condition. The Condition Properties dialog box appears.

Remove
Remove a selected condition.

Conditions
Conditions you specify.
chatUsers.UserId=UserId

Related Topic

Condition Properties
Description
Select the tables and fields to conditionalize.

Properties
Field
Value
Example
Table
Table in which to delete information.
chatUsers
Field
Field to conditionalize.
UserId
Operator
Operator used in the condition.
=
Values
Required value.
UserId
OK
Complete the condition.

Related Topic

SQL Tab
Description
An editable preview of the SQL code appears. The code is the result of your selections on previous tabs.

Related Topic

Results Tab
Description
View the query you have created.

Properties
Field
Description
Execute SQL button
Run the code generated from selections made on previous tabs. The Execute SQL dialog box appears.
Execute SQL dialog box
You can select a driver and data source from the pop-up lists. Enter your user name and password.
New Login
You can enable the checkbox if you want to change users.
Results
Data that results from executing the SQL code.

Related Topic
 

© Copyright 1999 Netscape Communications Corp.