Help with syntax...please!
I have a table with duplicate filenames and directories. I need a way to select the filesets (all rows of one filename) that overlap in a certain directory. In the example data below I would need to select the 3 sets of files (file2, file3 and file4) because those sets include the "overlap" directory.
SELECT [table].[File], [table].Path
FROM [table]
GROUP BY [table].[File], [K drive overlap].Path
HAVING ((([table].Path) Like "K:\Dir-overlap*"));
This only returns the part of the set...I want to group by the file and select the sets that contain at least one overlap field, but also retain the results from that set that aren't in the overlap directory. Any ideas?
File....................Path
File1..................K:\Dir1
File1..................K:\Dir1
File1..................K:\Dir3
File2..................K:\Dir1
File2..................K:\Dir-overlap
File2..................K:\Dir3
File3..................K:\Dir1
File3..................K:\Dir-overlap
File3..................K:\Dir1
File4..................K:\Dir3
File4..................K:\Dir-overlap
File4..................K:\Dir3
File5..................K:\Dir1
File5..................K:\Dir3
File5..................K:\Dir3