I have a query that matches two tables which is working fine and I need to have another query that grabs everything from a table where the record's aren't matched.
Here's the matching query which is working fine:
And here's the query that I'm just not getting quite right (I either get a "this sub query can only ever return 1 record" or it runs and there are 0 records returned) by looking at the two tables, I'm supposed to be getting 3 records right now.
I just don't know what I'm doing wrong here, any suggestions?
Here's the matching query which is working fine:
VB.NET:
SELECT SourceFiles.FileName
FROM SourceFiles INNER JOIN DestFiles ON (SourceFiles.FileName=DestFiles.FileName) AND (SourceFiles.FileName=DestFiles.FileName) AND (SourceFiles.FileSize=DestFiles.FileSize) AND (SourceFiles.Hash=DestFiles.Hash);
VB.NET:
'This one returns 0 records:
SELECT SourceFiles.FileName, SourceFiles.FileSize, SourceFiles.Hash
FROM SourceFiles
WHERE NOT EXISTS (SELECT * FROM Matches);
VB.NET:
'This one gives me the error of it only ever returning 1 record:
SELECT SourceFiles.FileName, SourceFiles.FileSize, SourceFiles.Hash
FROM SourceFiles
WHERE NOT (SELECT * FROM Matches);