We are currently updating the OP Help Center content for the release of OP 19, which is a member of the certified OP 14 family of products. OP 19’s official version is 14.19.1, which you may see in your software (such as in Help > About) and in the Help Center tabs labeled 14.19. You may also notice that the version number in content and videos may not match the version of your software, and some procedural content may not match the workflow in your software. We appreciate your patience and understanding as we make these enhancements.

SQL: Appointments Scheduled by Staff Member for Period

About

This report shows all appointments scheduled, and by which staff member, for a period between two specified dates.

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

Caveats

If an appointment is moved, the person who originally scheduled the appointment will be listed (not the person who moved the appointment).  For example, if Wanda scheduled the appointment, but then Bertha later moved it, this will show Wanda’s name, not Bertha’s.

Code

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

select staffname as scheduled_by, dateadd(minute,start_time,appt_date) as appt_time, code1, schedule.patno, schedule.uniqkey as appt_unique_number from schedule 
inner join staff1 on staff1.staffid = schedule.s_addr_id
where appt_date between :start_date and :end_Date