View Single Post
Old Jun 6th, 2007, 12:11 AM   #7
taporctv
Newbie
 
Join Date: Mar 2006
Posts: 20
Rep Power: 0 taporctv is on a distinguished road
[PHP]SELECT DISTINCT [SV-5.NameA]
FROM ([SV-5] LEFT JOIN SFtoFD ON [SV-5].NAMEA = SFtoFD.NAMEB) LEFT JOIN SFtoSV4 ON [SV-5].NAMEA = SFtoSV4.NAMEB
WHERE SFtoSV4.NAMEB IS NULL AND SFtoFD.NAMEB IS NULL;[/PHP]

This returns 9 records, which is the right amount. Now when I use

[PHP]SELECT COUNT(DISTINCT [SV-5.NameA])[/PHP]

I get an error message. What's my problem. Without the DISTINCT I get a count of 48 records which is not right.
taporctv is offline   Reply With Quote