>Although correct, many people consider this bad style - the ON
clause
>of the JOIN should contain only the join condition(s). So it would
be
>better to say
Yes indeed but here the 'zip' condition is in the join for the
possibility that the constant zip condition could speed up the join.
See S
news <[EMAIL PROTECTED]> wrote on 05/11/2005 09:09:36 AM:
> In article <[EMAIL PROTECTED]>,
> Peter Brawley <[EMAIL PROTECTED]> writes:
>
> > Scott, sorry, my mistake,
> > SELECT price
> > FROM fedex_zones z
> > INNER JOIN fedex_rates r ON z.zone=r.zone AND z.zip=94947
> > WHERE r.weight
In article <[EMAIL PROTECTED]>,
Peter Brawley <[EMAIL PROTECTED]> writes:
> Scott, sorry, my mistake,
> SELECT price
> FROM fedex_zones z
> INNER JOIN fedex_rates r ON z.zone=r.zone AND z.zip=94947
> WHERE r.weight = 25;
> PB
Although correct, many people consider this bad style - the ON
Scott, sorry, my mistake,
SELECT price
FROM fedex_zones z
INNER JOIN fedex_rates r ON z.zone=r.zone AND z.zip=94947
WHERE r.weight = 25;
PB
Scott Haneda wrote:
on 5/10/05 8:29 PM, Peter Brawley at [EMAIL PROTECTED] wrote:
Scott,
...In part, my t
Hi,
>>> SELECT zone from fedex_zones where zip = 94947
>>> select price from fedex_rates where zone = '8' and weight = '25'
your query should be :
select price from fedex_rates, fedex_zones
where fedex_zones.zip = 94947
and fedex_zones.zip = fedex_rates.zip
and fedex_rates.weight = '2
on 5/10/05 8:29 PM, Peter Brawley at [EMAIL PROTECTED] wrote:
> Scott,
>
>> ...In part, my trouble is that I need to take the resuling zone from the
>> first
>> select and use that to determine the field name.
>
>> I can easily do this in my code in 2 selects, but was hoping to be able to
>> get
Scott,
>...In part, my trouble is that I need to take the resuling zone
from the first
>select and use that to determine the field name.
>I can easily do this in my code in 2 selects, but was hoping to be
able to
>get the price back in just one select, if possible...
If you have control over