Requesting RDBMS Data
The File-AID Data Editor Request dialog captures your options for accessing RDBMS data. You can specify selection criteria to limit the rows and columns you wish to access. You can also establish other display and run options such as Browse mode or Edit mode. You can save and re-use your request, making it easy to access your data the same way the next time you access this object. Your recently used requests are listed on the Data Editor menu accessed by clicking the toolbar File-AID icon and selecting Data Editor.
Creating a New or Using a Saved Request
To create a new or use a saved request:
At the top of the File-AID Data Editor RDBMS Request window, enter a Request Name to create a new request, or select a saved request name from the request name pull-down list to use an existing request.
Edit RDBMS Selection Criteria
Optional selection criteria determines what portion of the selected RDBMS table/view becomes available for viewing or editing. You can choose which columns will be selected, conditions for selecting rows, and how the selected rows will be sorted. Only rows that match your selection criteria will appear in the editor data display. If you do not specify selection criteria, all rows and columns of the selected table/view are eligible for presentation in the editor data display.
If you are not already at the File-AID Data Editor Request for an RDBMS Object dialog, see Opening the File-AID-Data-Editor and Accessing-Distributed-RDBMS-Data for information on how to start the File-AID Data Editor.
To edit DB2 selection criteria:Select whether you want to use a local file containing a valid supported SQL query or specify your selection criteria manually. If you selected the SQL file radio button, enter the file name or click Browse to search for the desired file.
- Click Browse. The Open dialog box appears.
- After locating the file containing the SQL you want to use for accessing the database, click Open. You will return to the DB2 Request window.
Optionally, click on the Columns tab, select the desired columns from Available Columns and move them to Selected Columns. The columns you select are the only columns that will be viewable when you navigate to the data display. If you do not make any choices, all supported columns are automatically selected, and you can skip to the next step.
- Optionally, click on the Conditions tab. Rows will be chosen based on the conditions selected. You can add conditions or groups. Groups can contain multiple conditions. To add a new condition, click Select Where, then click Add Condition.
Under Column Name, click on <select field>. The Select filter field dialog box appears. Select the field to use as a filter. You can select only one field per condition. Then click OK.
- Select an Operator from the list (is equal to is the default). Operators are only available for selection after you have selected a field under Column Name.
For more information, see RDBMS Selection Criteria Operators. - Type a Value in the value column. Character literals require single quotes around values. Numeric literals (DECIMAL, INTEGER, and FLOAT) do not require quotes around values. If a character value you specify contains a single quote, you must enter two (2) single quotes. For example: 'DON''T' to find DON'T. Character literals only match data with the same exact case.
To enter more than one condition, click Add Condition and repeat steps 5-7 for each additional condition.
Each additional condition has a Boolean connector of OR. You may override the OR to an AND by clicking on the connector and using the pulldown to select AND or OR.
You may also choose to click Start New Group to create a new set of conditions. Each new group can be grouped with previous groups using AND or OR. Conditions within the group can also be grouped together using AND or OR as desired. The SQL window shows the constructed SQL to verify the conditions you have specified.- To enter more than one group, click Start New Group. Your cursor location will determine where the group will be created and the group level. You can add multiple conditions to any group - see the previous step.
Optionally, click on the Sorting tab. Click on <select column>. Click the column you want to use for sorting.
Query and Display Options
- Enter a number for the Maximum rows to select. The default is 2000.
- Enter the Rows/records to display per page. The default is 2000. This number cannot be larger than the number you entered in the Maximum rows to select field.
Optionally, select the Retrieve rows with uncommitted reads checkbox. This will allow statements to read rows that have been modified by other transactions but not yet committed. The Retrieve rows with uncommitted reads checkbox default is controlled by the Retrieve rows with uncommitted reads preference (Window > Preference > BMC > File-AID Data Editor - JDBC tab).
Run Mode Settings
Specify whether you want to view your data in Browse or Edit mode. Edit is the default. If you select Edit, specify whether to Enable Auditing. Enabled is the default.
Request Actions
- Once you have completed your request, it is a good practice to assign a Request Name and click Save to ensure that you can reuse the request in the future.
Click Run. You will navigate to the data display view in the designated mode (Browse or Edit).
- Click Close to exit the request dialog.
- To delete a saved request permanently, click Delete.
- To return to the last saved state of a request, use the Revert button.
RDBMS Selection Criteria Operators
Following is a description of the operators available for selection criteria conditions for distributed RDBMS requests.
For information on how to edit your selection criteria, see the preceding topic Requesting RDBMS Data.
- is equal to: 'George' will select all rows that contain George in this column. Wild cards are not allowed.
- is not equal to: 'George' will select all rows that do not contain George in this column. Wild cards are not allowed.
- is greater than: 'Nancy' will select all rows with names that appear alphabetically after Nancy in this column. Nancy is not selected. Wild cards are not allowed.
- is less than: 'Nancy' will select all rows with names that appear alphabetically before Nancy in this column. Nancy is not selected. Wild cards are not allowed.
- is greater than or equal to: 'Nancy' will select all rows with names that include Nancy and appear alphabetically after Nancy in this column. Wild cards are not allowed.
- is less than or equal to: 'Nancy' will select all rows with names that include Nancy and appear alphabetically before Nancy in this column. Wild cards are not allowed.
- is in list: Use parentheses around the values and a comma between the values. ('John', 'Matt', 'Mary') will select all rows that contain John, Matt, or Mary in this column. Wild cards are not allowed.
- is not in list: Use parentheses around the values and a comma between the values. ('John', 'Matt', 'Mary') will select all rows that do not contain John, Matt, or Mary in this column. Wild cards are not allowed.
- is null: All rows that do not contain any value in this column are selected. Do not enter anything in the value field when is null is selected. Wild cards are not allowed.
- is not null: All rows that contain any value in this column are selected. Do not enter anything in the value field when is not null is selected. Wild cards are not allowed.
- is between: You must use the AND operator with two values. 'John' AND 'Matt' will select all rows that contain names starting with John and ending with Matt including all names in between. Wild cards are not allowed.
- is not between: You must use the AND operator with two values. 'John' AND 'Matt' will select all rows that do not contain names starting with John and ending with Matt including all names in between. Wild cards are not allowed.
- contains: You can enter specific data, and wild cards are allowed. For example '%ART%' will select all rows containing data that contains ART anywhere within this field.
- does not contain: You can enter specific data, and wild cards are allowed. For example '%ART%' will select all rows containing data that does not contain the value ART anywhere within this field.
SQL Editor
When you define Selection Criteria, the choices you make will automatically create the SQL required for selecting your data. Generated SQL displays in the SQL window of the Selection Criteria section of the Request. If, however, you want to create the SQL yourself, rather than create it automatically by making selection criteria choices, you can click the Edit SQL icon () to open the SQL editor.
To Edit Your SQL Manually:
Start and start File-AID Data Editor.
- Make any automated selection criteria choices first.
- Click the Edit SQL icon (
). This opens the SQL Editor.
- Enter your SQL as desired.
- Click Save.
- Change your Maximum rows to select and Rows to display per page if desired.
Select your run mode (Browse or Edit), and click Run.