Database Search

Instructions below outline how to run a database search that you have been provided by Best Practice Software Support.

Support may have sent a query to run in two ways: 

  • Text to cut and paste into the Database search screen.
  • A file containing the query to run. You must load the query file and then run the query.

Run a query from text

The example query below returns all active patients:

SELECT *

FROM BPS_Patients

WHERE StatusText = 'Active'

ORDER BY surname, firstname

To run a query:

  1. From the main screen of Bp Premier, select Utilities > Search or press (Ctrl + S) to open the Database search window.
  2. Delete the existing text in the SQL Query: text area, highlighted in the example screenshot above.
  3. Copy and paste the query given into the empty text area.
  4. Click Run query to display the results in the bottom half of the screen. Each row is a patient that matches the search criteria.

Load a query from file

Save the query file sent to you by Support to a known location on the Bp Premier workstation.

  1. Select Utilities > Search or press (Ctrl + S) to open the Database search window.
  2. Click Load query. A file explorer will open.
  3. Browse to the query file you saved, select the file and click Open. The query in the file will be loaded into the SQL Query: text area.
  4. Click Run query to display the results in the bottom half of the screen. Each row is a patient that matches the search criteria.

When you click Load query, the file explorer will default to the last opened location. If you would like to run any of the supplied queries again, browse to C:\Program Files\Best Practice Software\BPS\SuppliedQueries\. This folder contains many descriptively named supplied queries.