Hello!
I am VERY new to OpenEMR and queries in it. I found a format in the community (thank you!) that is close to what I am trying to accomplish, however, when I run it - it does not like the date. I have tried different variations and still receive the following: “Error in query (1054): Unknown column ‘‘2022’ in ‘where clause’” - Can anyone help? See below.
Thank you!
SELECT
patient_data.fname,
patient_data.lname,
openemr_postcalendar_events.pc_pid,
patient_data.DOB,
openemr_postcalendar_events.pc_eventDate,
openemr_postcalendar_events.pc_startTime,
openemr_postcalendar_events.pc_title,
openemr_postcalendar_events.pc_hometext
FROM
patient_data
left join
openemr_postcalendar_events on patient_data.pid = openemr_postcalendar_events.pc_pid
WHERE openemr_postcalendar_events.pc_eventDate=‘2022-10-05’
order by openemr_postcalendar_events.pc_startTime asc
;