I'm working on a report for a doctor's office and they'd like a printout of the schedule to view at a glance.
Desired Output is:
Dr 1 Dr 2 Dr 3 Dr 4
8:00 D Smith M Jordan J Worthy
K Smith
8:15 A Jamison V Carter R Felton
R Williams
S May
8:30 etc
The data is stored as:
appt_dttm Dr_id pat_id appt_id
7/1/07 8:00 1 D_Smith 1
7/1/07 8:00 2 M_Jordan 2
7/1/07 8:00 1 K_Smith 3
7/1/07 8:00 3 J_Worthy 4
etc.
What I'm currently getting:
Dr 1 Dr 2 Dr 3 Dr 4
8:00 D_Smith
M_Jordan
J_Worthy
K_Smith
8:15 A_Jamison
V_Carter
R_Felton
R_Williams
S_May
etc.
---------------------------------------
Any ideas how to get the appointments onto the same line? I know I can group on the appt time and use a Max/min to get the appointments on the same line. But, that won't work if there are more than 2 appts for the same time for the same doctor.
Thanks.
Desired Output is:
Dr 1 Dr 2 Dr 3 Dr 4
8:00 D Smith M Jordan J Worthy
K Smith
8:15 A Jamison V Carter R Felton
R Williams
S May
8:30 etc
The data is stored as:
appt_dttm Dr_id pat_id appt_id
7/1/07 8:00 1 D_Smith 1
7/1/07 8:00 2 M_Jordan 2
7/1/07 8:00 1 K_Smith 3
7/1/07 8:00 3 J_Worthy 4
etc.
What I'm currently getting:
Dr 1 Dr 2 Dr 3 Dr 4
8:00 D_Smith
M_Jordan
J_Worthy
K_Smith
8:15 A_Jamison
V_Carter
R_Felton
R_Williams
S_May
etc.
---------------------------------------
Any ideas how to get the appointments onto the same line? I know I can group on the appt time and use a Max/min to get the appointments on the same line. But, that won't work if there are more than 2 appts for the same time for the same doctor.
Thanks.