Larry, are you saying that this will work without qualifiers on the last 2
members of the WHERE-clause,

AND trantype='HMP'           as opposed to TABLE_NAME.trantype
AND locno IS NOT NULL                  and TABLE_NAME.locno

and what about

ORDER BY location                          TABLE_NAME.location

It seems like I've had a problem once or twice in the past when I didn't
qualify the COL's in something like this, especially with regard to a common
column.

Thanks,
Steve in Memphis


----- Original Message ----- 
From: "Lawrence Lustig" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 02, 2004 12:07 PM
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