ok, I did this.

I get everything different, but the id number from the table where the count
comes from,
the id number of the 1 vehicle that is in there...it has a different
productId, I see the two different productId's, it has a different
salesOrderDEtailId, they both have the same salesOrderId...this isnt making
sense....

hmmm

tony

-----Original Message-----
From: Dick Applebaum [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 06, 2004 11:52 PM
To: CF-Talk
Subject: Re: query question

Tony

why don't you modify the queries to return the actual data columns in the
joins in addition to the count -- that way you can see what the db is
returning

HTH

Dick

On May 6, 2004, at 8:13 PM, Tony Weeg wrote:

> ok, in the two queries below, the salesOrderDetailId and the productId
> are  different for each.
>  the only thing in common is that they have the same companyIDNumber.
>  however since that's
>  not in the where clause, how can this return that both have a count
> of 1,  where I know that  the only one that has a count of one, for
> real, is the top one?
>
>  select
>  count(ipAddressNumber) as vehicles
>  from vehicleTable v
>  inner join companyTable c on c.companyIdNumber = v.companyIdNumber  
> inner join account a on a.accountId = c.crmGUID  inner join salesOrder
> so on a.accountId = so.accountId  inner join salesOrderDetail sod on
> sod.salesOrderId = so.salesOrderId
>
>  inner join product p on p.productId = sod.ProductId  where
> (sod.salesOrderDetailId = 'b25513c8-22e3-405e-9b2a-917c606e5149'
>  and p.productId = '9829daef-84ce-4248-9696-fa6686411b94')
>
>  select
>  count(ipAddressNumber) as vehicles
>  from vehicleTable v
>  inner join companyTable c on c.companyIdNumber = v.companyIdNumber  
> inner join account a on a.accountId = c.crmGUID  inner join salesOrder
> so on a.accountId = so.accountId  inner join salesOrderDetail sod on
> sod.salesOrderId = so.salesOrderId
>
>  inner join product p on p.productId = sod.ProductId  where
> (sod.salesOrderDetailId = '0568f951-29ef-4881-a786-d50e0d75e3f1'
>  and p.productId = 'e08c80b4-fd57-482e-93b9-213aef2ba83d')
>
>  cheers!
>
>  ...tony
>
>  tony weeg
>  senior web applications architect
>  navtrak, inc.
>  www.navtrak.net
>  [EMAIL PROTECTED]
>  410.548.2337
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to