Subject Re: [firebird-support] SQL Question
Author Helen Borrie
>At 06:54 07/22/03, you wrote:
> >Hi all,
> >
> >when I execute the following SQL, I get duplicates records. Anyone know why?
> >
> >There are 2 nozzles and 2 grades of fuel.
> >
> >SELECT T.Grade, G.Descrip,
> >N.LSold as VolSold, N.MSold as MoneySold
> >FROM Tanks T JOIN Nozzles N
> >on
> >T.Number = N.Tank
> >JOIN
> >Grades G
> >ON
> >T.Grade = G.Grade_Num
> >Order by T.Grade, G.Descrip

At 08:04 AM 22/07/2003 -0700, Scott Taylor wrote:


>Because you have two separate joins to TANKS: T.Number and T.Grade

No, that wouldn't cause duplicate rows. These are all inner joins, so it
should give as many rows as there are rows in Tanks.

heLen