GaryWilsonCPA
Technical User
this is my union join, it works in designer sql, I have placed this in a report under "show sql" and there is no adverse reaction. How do i place the fields on the report?
SELECT
appointment_scheduling.PATID as PATID,
appointment_scheduling.appointment_date as DATE,
appointment_scheduling.service_code as SERVICECODE,
appointment_scheduling.client_name as NAME
FROM SYSTEM.appointment_scheduling
UNION ALL
SELECT
staff_tx_history_all.PATID as PATID,
staff_tx_history_all.date_of_service as DATE,
staff_tx_history_all.SERVICE_CODE as SERVICECODE,
staff_tx_history_all.PATID as NAME
FROM
SYSTEM.staff_tx_history_all
SELECT
appointment_scheduling.PATID as PATID,
appointment_scheduling.appointment_date as DATE,
appointment_scheduling.service_code as SERVICECODE,
appointment_scheduling.client_name as NAME
FROM SYSTEM.appointment_scheduling
UNION ALL
SELECT
staff_tx_history_all.PATID as PATID,
staff_tx_history_all.date_of_service as DATE,
staff_tx_history_all.SERVICE_CODE as SERVICECODE,
staff_tx_history_all.PATID as NAME
FROM
SYSTEM.staff_tx_history_all