Important Content Update Message
We are currently updating the OP Help Center content for the release of OP 20. OP 20 (official version 20.0.x) is the certified, 2015 Edition, version of the Office Practicum software. This is displayed in your software (Help tab > About) and in the Help Center tab labeled Version 20.0. We appreciate your patience as we continue to update all of our content.

SQL: Find Favorite Pharmacies


This report lists all pharmacies that are favorites of your patients'.

A sample image of this SQL report run in the Database Viewer is shown below:


This SQL only includes preferences of patients with status = ‘ACTIVE’.


To highlight and copy the code below to your clipboard, simply click the Copy button.

select ra.patno, specialty_name, ab.fname, ab.lname, company from register_addendum ra
left outer join specialty on ra.specialty_id = specialty.specialty_id
left outer join addressbook ab on ra.addr_id = ab.addr_id
inner join register on ra.patno = register.patno 
 where specialty_name = 'PHARMACY' and status_pat ='ACTIVE'