Hi,
I am trying to get a distinct count of the phone numbers in the two tables, tblImportCalls and tblCalls. When I use the statement beneath it returns a count of distinct numbers which appear in both tblCalls AND tblImportCalls.
I need the count to reflect the fact that there might be numbers in tblImportCalls which are not in tblCalls and vice versa. It does not count the numbers which appear in only one of the tables.
Can somebody show me what's wrong with the statement...
SELECT COUNT(DISTINCT tblCalls.PhoneNumber)
FROM tblCalls join tblImportCalls
on tblCalls.PhoneNumber = tblImportCalls.PhoneNumber
WHERE MONTH(tblCalls.DateOfCall) = 6
AND YEAR(tblCalls.DateOfCall) = 2003
Thanks for any help,
Robin
I am trying to get a distinct count of the phone numbers in the two tables, tblImportCalls and tblCalls. When I use the statement beneath it returns a count of distinct numbers which appear in both tblCalls AND tblImportCalls.
I need the count to reflect the fact that there might be numbers in tblImportCalls which are not in tblCalls and vice versa. It does not count the numbers which appear in only one of the tables.
Can somebody show me what's wrong with the statement...
SELECT COUNT(DISTINCT tblCalls.PhoneNumber)
FROM tblCalls join tblImportCalls
on tblCalls.PhoneNumber = tblImportCalls.PhoneNumber
WHERE MONTH(tblCalls.DateOfCall) = 6
AND YEAR(tblCalls.DateOfCall) = 2003
Thanks for any help,
Robin