Hi all,
I have a 3 tables that each contain a date field. Each table has only the dates it needs(ie. Table 1 has 4 dates because it contains 4 records). Other tables have more records and therefore more dates - almost daily. All tables are related by date. When I run my query, I get 155 records out of a possible 265 records containing data. No table has 155 records and I have tried editing the relationships so that the joins were different each time. The only change was negative.
Here is a sample using 3 tables (names have been changed to protect the innocent
).
SELECT ControlDates.ControlDate, Table1.Field1, Table2.Field1, Table1.Field2, Table1.Field3, Table1.Field4
FROM (ControlDates INNER JOIN Table1 ON ControlDates.BalanceDate = Table1.T1Date) INNER JOIN Table2 ON ControlDates.BalanceDate = Table2.T2Date;
ControlDates has 490 records, table1 has 191, and Table2 has 265. The query results 155 records
.
I'm guessing it is the relationships/JOINS. How do I resolve this.
Thank you,
David
I have a 3 tables that each contain a date field. Each table has only the dates it needs(ie. Table 1 has 4 dates because it contains 4 records). Other tables have more records and therefore more dates - almost daily. All tables are related by date. When I run my query, I get 155 records out of a possible 265 records containing data. No table has 155 records and I have tried editing the relationships so that the joins were different each time. The only change was negative.
Here is a sample using 3 tables (names have been changed to protect the innocent
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
SELECT ControlDates.ControlDate, Table1.Field1, Table2.Field1, Table1.Field2, Table1.Field3, Table1.Field4
FROM (ControlDates INNER JOIN Table1 ON ControlDates.BalanceDate = Table1.T1Date) INNER JOIN Table2 ON ControlDates.BalanceDate = Table2.T2Date;
ControlDates has 490 records, table1 has 191, and Table2 has 265. The query results 155 records
![[thumbsdown] [thumbsdown] [thumbsdown]](/data/assets/smilies/thumbsdown.gif)
I'm guessing it is the relationships/JOINS. How do I resolve this.
Thank you,
David