1
Hello,
I need to make a date-filtered query. The problem is that non-existent dates in the table need to be returned by the query, having all other fields as Null.
SELECT Data, Servico
FROM controle_equipe
WHERE ((Data >= #4/1/2016#) And (Data <= #5/2/2016#));
The big leap is to need to return all the dates of the selection criteria, even if they are not contained in the controle_team table. I’ve tried using IIF, CASE, but to no avail
To bring in the nulls, all it takes is one
WHERE data IS NULL OR ( ... condições ... )- As for the dates, you can usedata BETWEEN( data1, data2 )to make the two comparisons at once. Anyway, date stored in the order of the question will always give problem. In its format,4/2/2006will be within the range shown.– Bacco