The Query window opens when a user with the User Query Admin permission clicks Reports, User Query, or once a query has been run.
Text Box: Displays the query text. If you have User Query Admin permission, you can enter text directly in this box. If you do not, it is disabled.
Favorites: Open Query Favorites.
Add to Favorites: Add the query text currently in the text box to Query Favorites.
Copy: Copy the query text in the text box to the clipboard.
Paste: Paste any text currently on the clipboard into the text box.
Submit Query: Run the query text currently in the text box. When long queries are run, the Submit button will change to Stop Execution. Click to cancel a large query that may take a long time to run.
Format: Select how to view the results.
- Human-readable: This is an easy to read format. Some column names that are used in our tables may display as follows:
- Dates may be converted to standard format.
- Dollar amounts may receive the extra zeros and be right aligned.
- Enumerations may convert (built-in lists like areas of the mouth, patient status, gender, etc.).
- Definitions linked to the definition table get converted.
- Provider numbers will show the provider's abbreviation.
- Patient numbers will show patient name.
- True/false: Boolean values will show true/false.
- Raw Format: In this format, the results are not as easy to read, for example there may be meaningless numbers or no extra zeros on dollar amounts.
Title: The title of the query in the text box, if one exists.
By default the results will display in human-readable format. If a column header is prefaced with a $, the cells are always formatted as a dollar amount.
To more easily view the query results, there are a few display options.
Once the table displays the way you want it, there are several options:
- Print Preview: View the query like a printed report. Some columns will show a grand total at the bottom of the report while in preview mode. You can Zoom in or use the blue arrows to scroll through pages. Click Query View to return to regular query view.
- Print: Print the query to the default printer.
- Export: Save the file as a tab delimited txt or xls file to use in another program (e.g. Microsoft Word or Excel). Typical uses include letter merge, spreadsheet analysis, or financial imports. Set the default folder for exported queries in Data Paths Setup (OpenDentalExports).
- To include a title/header on printed query results, save the query to your Query Favorites, and enter the title. Then, run the query again.
- Advanced users can run queries directly on the database from outside programs using ODBC or other methods.