districtno and locno are in both tables and arent unique values in either
one, would i still not have to limit by districtno in both tables?

----- Original Message ----- 
From: "Lawrence Lustig" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 02, 2004 10:07 AM
Subject: [RBASE-L] - Re: Propper SQL


> > sel distinct location.locno location.location
> > from location, tranmaster
> > where location.districtno='67959'
> > and tranmaster.districtno='67959'
> > and location.locno=tranmaster.locno
> > and trantype='HMP'
> > and locno is not null
> > order by location
> >
> > do you mean instead of location.locno=tranmaster.locno i just do
> > locno=locno?
>
> No, I mean:
>
> sel distinct location.locno location.location
> from location, tranmaster
> where tranmaster.districtno='67959'
> and location.locno=tranmaster.locno
> and trantype='HMP'
> and locno is not null
> order by location
>
> You don't need to check districtno in both tranmaster and location.
> --
> Larry
>

Reply via email to