I'm trying to build a sales report of sorts.
First I have a client table which contains Account numbers.
Now I have a second table with all of the sales info. This includes
shipper, consignee, payor, date, and revenue.
In second table the shipper, consignee, and payor, are all represented by an
Account number.
what i am trying to do... If the account number is the shipper, consignee,
or payor
in a record then I want to include their revenue.
I am sort of able to do this but I am basically setting up three queries and
piggy backing them against each other. any one know of a better method??
E - 03 Aug 2006 19:37 GMT
When you say 'piggy backing' does that mean you are using SubQueries as in:
Select Fields From Table Where Field1 IN (
Select Field1 From Table 2 Where Field1 IN (
Select Field1 From Table3))
If so, these can usually be shortened with Joins but i'm not certain if it
anymore
faster than what you are doing with subqueries.
> I'm trying to build a sales report of sorts.
>
[quoted text clipped - 12 lines]
> I am sort of able to do this but I am basically setting up three queries and
> piggy backing them against each other. any one know of a better method??