On 12/2/09 11:13 AM, "David Shere" wrote:
> Tom Worster wrote:
>> how about using LEFT JOIN:
>>
>> SELECT ...
>> FROM listings a
>> LEFT JOIN Transactions b ON b.PartNumber = a.PartNumber
>
> This gives me a result set of 456,567 lines. I'm looking for a result
> set of 60-70 lines. (That's h
At 10:13 AM 12/2/2009, you wrote:
Tom Worster wrote:
> how about using LEFT JOIN:
>
> SELECT ...
> FROM listings a
> LEFT JOIN Transactions b ON b.PartNumber = a.PartNumber
This gives me a result set of 456,567 lines. I'm looking for a result
set of 60-70 lines. (That's how many part numbers w
Tom Worster wrote:
> how about using LEFT JOIN:
>
> SELECT ...
> FROM listings a
> LEFT JOIN Transactions b ON b.PartNumber = a.PartNumber
This gives me a result set of 456,567 lines. I'm looking for a result
set of 60-70 lines. (That's how many part numbers we have.)
> and for speed, does Tra
At 01:21 PM 12/1/2009, David Shere wrote:
select distinct a.PartNumber as 'Part Number', (
select count(1)
from Transactions b
where b.PartNumber = a.PartNumber) as 'No. Sold'
from listings a
order by a.PartNumber
It currently takes 30 seconds to run. Transactions has 1200 records and
On 12/1/09 2:21 PM, "David Shere" wrote:
> select distinct a.PartNumber as 'Part Number', (
> select count(1)
> from Transactions b
> where b.PartNumber = a.PartNumber) as 'No. Sold'
> from listings a
> order by a.PartNumber
>
> It currently takes 30 seconds to run. Transactions has
select distinct a.PartNumber as 'Part Number', (
select count(1)
from Transactions b
where b.PartNumber = a.PartNumber) as 'No. Sold'
from listings a
order by a.PartNumber
It currently takes 30 seconds to run. Transactions has 1200 records and
listings has 7000.
Multiple listings can