Re: join method
- From: "Jeff Boyce" <JeffBoyce_IF@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 3 Jan 2009 21:07:28 -0800
Sorry, I'm not following your description.
Please post the SQL statement of your query.
--
Regards
Jeff Boyce
www.InformationFutures.net
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/
Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
"NTC" <NTC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:02085CFD-3B85-49A9-A017-95C44152A0D4@xxxxxxxxxxxxxxxx
no query has all; so while your suggestion will give 'all' of 1 query - -it
can't give overall 'all' because so single query contains the all....will
can make a list of all by joining all customers w/ employees and implement
what you suggest...it does work...just strikes me as a messy solution
though.....
"Jeff Boyce" wrote:
Open the query in design view.
Highlight one of the join lines and right-click it. The pop-up window
match(probably) indicate that you are looking for records where the values
sales,in BOTH tables.
I believe you want the choice that lets you see all the records in ONE
table, and any that match in the OTHER.
--
Regards
Jeff Boyce
www.InformationFutures.net
Microsoft Office/Access MVP
http://mvp.support.microsoft.com/
Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
"NTC" <NTC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6FAF2C76-78C1-44A8-B137-483B7A8ACB92@xxxxxxxxxxxxxxxx
have 7 queries on 7 tables, 1:1 for explanation can use just 2:
containsexpenses : the query is date range & geo region.... all work fine.
need a master query to join (for a report source) where a record
$20;unique customer/employee data joinedappropriate
all 7 queries always have a customerID and employeeID along with
other values i.e. sales amount, expense amount, salescalls, etc.
if I join on CustomerID field I can get this:
CustA Sales$100 Empl1 CustA Expenses$20 Empl1
CustA Sales$100 Empl1 CustA Expenses$15 Empl2
(first 3 fields from sales query, second 3 fields from expenses query)
which is correct Employee 1 did have a sales of $100 and expenses of
thiswhile employee 2 also did have expenses of $15 but had no sales in
course;time
period from CustA. There is no CustA $0 sales entry for Empl2 of
doesn'tso
the problem being that this sales amount listed with employee B isline;
misleading...but I do understand the results from this join
if I join on both CustomerID and EmployeeID I only will get the first
because as an AND there is no employ2 sales so the employ2 expense
thatget joined into the results.
what is needed is:
CustA Sales$100 Empl1 CustA Expenses$20 Empl1
CustA Expenses$15 Empl2
normally I could rely on the Report itself to display this via
sorting/grouping; however there are alot of other calculated fields
moreneed
manipulation not being discussed here suffice to say that it would be
soideal to have this data set established in a query result.
none of the 7 queries will have every customer/employee combination;
thethere is no "lead" or master dataset to drive a join to all the otheremployeeListtable
queries. I could create one from the customerListtable and
that would establish every customer/employee combination and then make
certainjoin from this on both customer field and employee field. I feel
thereit
would return the correct results but seems very inefficient and that
possiblityis
a better method - but even scripting sql join for every And/Or
among the 7 sets of data seems awfully messy too.
would welcome a sanity check....tia
.
- References:
- join method
- From: NTC
- Re: join method
- From: Jeff Boyce
- Re: join method
- From: NTC
- join method
- Prev by Date: Re: Update Query or Make-Table Query
- Next by Date: Re: append query
- Previous by thread: Re: join method
- Next by thread: append query
- Index(es):
Relevant Pages
|