Left joining on 2 critirias.

G

Geel

Hello,

I got the following structure set up:

for Total detail reports, ( not per partner reports )

Savings_ID
Contract_ID
Category_ID
Department_ID

for per partner reports, ( per opco )

Opco_ID
Savings_ID
Contract_ID
Category_ID
Department_ID

What i wanted to do is when there are values in a query wich is on the
department level they need to be shown always, even if the savings_ID
and other levels are empty. I did this by re-building my total query,
making an left join. And actually i was kindof surprised but it worked
for the Total detail reports.

Now i need to do the same for the Opco reports, but the left join that
previously only had to join on the department_ID now also has to join
on the Opco_ID. Because every report is build per opco now. Now this i
can't work out, is there a possibility of doing this ? Or is this, as i
think atm, just rather impossible?

Thanks a lot, and I hope you got enough information to understand the
situation.

Tim Schuffelen
 
J

John Vinson

Now i need to do the same for the Opco reports, but the left join that
previously only had to join on the department_ID now also has to join
on the Opco_ID. Because every report is build per opco now. Now this i
can't work out, is there a possibility of doing this ? Or is this, as i
think atm, just rather impossible?

Possible, and not too difficult!

In the query grid, simply drag each field from the "one" table to the
"many". Select each join line in turn and choose Option 2 - "show all
records in <one> and matching records in <many>".


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top