0
We are making a bucket rental system for our tcc, but on the sales screen we only need to appear the available buckets in the selected period.
SELECT tabCacamba.CodCac, tabPrestadores.CodPre, tabregcac.dtini, tabregcac.dtfim
FROM tabPrestadores INNER JOIN (tabCacamba INNER JOIN tabregcac ON tabCacamba.CodCac = tabregcac.codcac
FROM tabPrestadores INNER JOIN (tabCacamba INNER JOIN tabregcac ON tabCacamba.CodCac = tabregcac.codcac) ON tabPrestadores.CodPre = tabCacamba.Prestador
WHERE (((tabCacamba.CodCac) Not In (Select tabCacamba.CodCac FROM tabCacamba WHERE [Initial Date] between tabRegCac.dtIni and tabRegCac.dtFim)));
It seems to me that your SQL command is syntactically wrong. Another thing is that you talk about availability in the period but just test a start date.
– anonimo