On May 6, 2004, at 9:25 PM, Tony Weeg wrote:
> am using sql server, I have aqua data studio, im using query analyzer
> right
> now...
>
> I don't have any other way of getting to the count, that's the
> problem there
> isnt anything else in the vehicle table that links back to the
> company table
> that has the guid that links back to the crm system, and its guid for
> the
> company, and then the order based on the account number, and the
> sales order
> details, based on the sales order number.
>
> maybe I just cant do it with the current table layout. its like, the
> first
> part of the query is locking the result set in regardless of what else
> matches...
>
> heck...ill try your plan, its how I built the thing in the first place
> tho'....cause
> that's how I trouble shoot too :( so maybe again might work, ill try
> it
> again.
>
> is there any reason that the first join would be sooo commanding in
> regard
> to its relentless match regardless of the where clause?
>
That's an interesting question -- an inner join is supposed to return
something if both side of the join are present - so what happens if the
first joins matches and the others don't -- do you have a match or
not--- hmmm
Unfortunately I don't have a db handy with enough relationships that I
can experiment with -- I have Sybase_ASE running on my Mac for complex
dbs -- common ancestry with SQL-Server.
Another option is to put the tests in the where clause with AND
operators
Dick
> tony
>
> -----Original Message-----
> From: Dick Applebaum [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 07, 2004 12:22 AM
> To: CF-Talk
> Subject: Re: query question
>
> What usually helps me in a case like this is to simplify the query
> (if you
> can).
>
> 1) Take out all the joins
>
> 2) add them back one at a time
>
> Kinda' build the complex query in a series of simple steps..
>
> Do you have a interactive SQL client that you can use to do this?
>
> It looks like you are using SQL-Server, No?
>
> Dick
>
> On May 6, 2004, at 8:59 PM, Tony Weeg wrote:
>
> > 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
> >
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- query question Robert Shaw
- RE: query question Philip Arnold
- RE: query question Parker, Kevin
- Re: query question Casey C Cook
- Re: query question Robert Shaw
- query question Tony Weeg
- Re: query question Dick Applebaum
- RE: query question Tony Weeg
- Re: query question Dick Applebaum
- RE: query question Tony Weeg
- RE: query question Dick Applebaum
- RE: query question Tony Weeg
- Re: query question Dick Applebaum