Greetings,
The following query takes a wee bit too long to process so i was wondering whether a SQL guru out there could offer their assistance. I need to join on dates in order to retrieve each date whetehr a record exists in qryFSC_Calendar or not.
Many thanks
The following query takes a wee bit too long to process so i was wondering whether a SQL guru out there could offer their assistance. I need to join on dates in order to retrieve each date whetehr a record exists in qryFSC_Calendar or not.
Many thanks
Code:
SELECT
A.INCIDENT_ID, A.INCIDENT_REF, B.DATE, A.INC_SERIOUS_SC, A.LKUP_DATA_ID, A.LKUP_DATA_SC, A.RAG_ID, A.RAG_SC, A.CALLBACK_RMK
FROM
qryFSC_Calendar AS A INNER JOIN [DATE] AS B ON (B.DATE+#00:00:00# >= DateValue(A.U_DATE4)+#00:00:00#) AND (B.DATE+#00:00:00#<= DateValue(A.U_DATE6)+#23:59:59#)
ORDER BY
A.INCIDENT_REF, B.DATE;