I have various sub-queries which are used in a query which summarises related information. One of the sub-queries is designed to find out how many referrals were received in a particular month in a particular locality. There are 9 different localities. The user enters the parameters: [locality], [start date] and [end date]. However, in some localities there may be no referrals at all in a particular month. If this is the case, the query returns no data. The query that this feeds into then also returns no data at all, in any of its colums and its associated report gives an error message.
How can I get my first sub-query to return data for all 9 localities, with 0 if there were no referrals for the period?
I am not an IT professional but have responsibility for establishing and maintaining 11 similar databases (in addition to the rest of my work)!
I would be delighted if anyone could help me and thank you in advance.