It is possible to create a new query in your project query tab via the New button in the Query tab, or via the New> Query or Insert> Query commands. Queries help you to answer very specific questions about your data that would be difficult to answer by looking at table data directly. You can use queries to filter your data, to perform calculations with your data, and to summarize your data. You can also use queries to automate many data management tasks and to review changes in your data before you commit to those changes.
What do you want to do?
Select
a data source and table
Access
a specific level in a data source
It is possible to create a new query in your project query tab via the New button in the Query tab, or via the New> Query or Insert> Query commands. An automatic query will be created.
However, it is possible to create a Data Source's SQL Query from a ClicknDECiDE Builder query via the command Query> Create DataSource's SQL or retrieve a Query/400 via the command Insert> Query/400 or New> Query/400 directly from a ClicknDECiDE Builder project. The following window appears, with the Tables tab selected by default.
Select a Data Source and Table
The All Data Sources pane displays all the data sources defined for ClicknDECiDE Builder, the upper right pane displays the data source's tables. To select a data source please perform the steps below:
Click the expand (plus "+") sign to the left of the data source you want to access.
Enter the login and password to the data source. The upper right pane will display the database tables, unless there are several levels to access the table level. For an iSeries TCP/IP data source, first the library list will be displayed in the All Data Sources pane and the upper right pane.
Click
the expand (plus "+") sign to the left of the library you want
to access in the All Data Sources pane
or double-click the library name in the upper right pane. The table list
will be displayed in the upper right pane.
Perform
a drag-and-drop operation for the table you want to use to build the query
and drop it in the lower pane. In this example the Sales table has been
drag and dropped into the lower pane.
Note: to select several tables, perform a drag-and-drop operation for each table to the lower pane of the Tables tab.
If the user has selected the first table, double-clicking a table enables the user to go directly to the Query tab and run a query with all the fields in the table automatically selected when the user clicks Query> Run.
Once the required tables are selected and the required join statements defined, click View> Query or click the Query tab to build your query.
Access a Specific Level in a Data Source
To access a specified level in a data source, for example a library, without needing to browse all the existing levels:
Right-click the data source name.
Click Browse in the context menu.
Enter the library name (for example using wildcards). For example, LIBRARY/S* will only display tables beginning with an S in the library name.
See Also |