Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with Group By clause
> I seem to have gotten it working with (again simplified)
>
> SELECT C.CustomerID, C.Name, C.Address, COUNT(V.VisitID) as VCount
> FROM CustomerTable C, VisitsTable V
> WHERE C.CustomerID=V.CustomerID(+);
> GROUP BY C.CustomerID, C.Name, C.Address
>
> Is this the "correct" way to do it?
It seems reasonable. If it is correct is another issue. It is correct in that it raises no SQL error. But in order for a computer programm or sql statement to be correct, it is not sufficient to just be parsed without error but also always do what the user expects it to do. As I don't know what you expect the query to do, I am not in a position to say if it is correct.
hth
Rene Nyffenegger
-- Projektleitung und Entwicklung in Oracle/C++/C# Projekten http://www.adp-gmbh.ch/cv.htmlReceived on Mon Mar 10 2003 - 18:43:20 CST