Entering Queries
Most of the fields you see in the windows are database fields. You can retrieve records from the database that contain specific values in these fields by entering search criteria in the fields and then performing a query.
The two functions required for performing a query are [Enter Query] and [Execute Query]. You enter query mode by pressing F7, or the Query, then Enter Query menu item, or you invoke the query icon. You then complete the query by entering some search criteria and pressing F8, or Query, then Execute Query, or the execute query icon.
When you invoke query mode the system clears the window of existing records, and you can enter your query specifications. If you have pending changes when you press [Enter Query], the system prompts you to save your changes first.
The module window indicates query mode in the status line. While in query mode, you can use lists of values, enter standard SQL wildcards in fields, and skip mandatory fields. The system suspends normal field validations while you are in query mode, since it is allowing you to use the module window to enter query criteria, rather than validating a record in preparation for saving it to the database. Some forms have fields that do not accept query criteria, so you cannot enter anything in those fields while in query mode. These are usually fields that do not correspond directly to fields in the database.
For more information, see:
Parent topic: Introducing the Oracle Clinical Interface
Pattern Matching With Wildcards
The wildcard character (%) can substitute for a letter or group of letters when you enter the value. So, if you enter TET% as the current value for the parameter DRUG, the system looks for a drug name beginning with "TET." If you enter %TET, the system looks for a drug name ending with TET. If you enter %TET%, the system looks for a drug name containing TET in any position. You cannot search for a single character — for example, TEsingle characterT.
Parent topic: Entering Queries
Executing Queries
After you have entered your query criteria, select [Execute Query]. Oracle Clinical retrieves from the database all records that meet your query criteria, and populates the window.
If you simply want to know the number of records that would meet your query criteria, select [Count Hits] rather than [Execute Query]. Instead of retrieving the records, Oracle places the number of records that meet your query criteria in the Count field of the status line.
If your query retrieves no records, the system displays the following message on the message line:
Query caused no records to be retrieved. Re-enter
The criteria that you entered remain displayed. You are still in query mode, so you can simply change your criteria and then select [Execute Query] without having to select [Enter Query] again.
If you have already executed a query and press [Enter Query] twice in a row, you are placed in query mode, and the query criteria that you last entered are re-displayed.
Once the query successfully retrieves records, you are no longer in query mode, but in normal operational mode, and you can create, update, or delete records as your privileges allow.
Parent topic: Entering Queries