Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Joins Right/Left Joins

Status
Not open for further replies.

cmayer10

Technical User
Aug 8, 2014
9
US
All,
Suppose I have two tables:

My Budget Table has the following fields: Program#, Year, Acct#, BudgetAmount.
My Expense Table has the following fields: Program#, Year, Acct#, ActualAmount.

Account Numbers (for telephone, salary, etc.) and Program Numbers (for case management, camp, etc.) can be duplicated (each program will have the same set of account numbers). A record is unique by the unique combination of program#, acct# and year (the combination will never be duplicated in either table). If the expense for a given program, acctnum, year, is zero, nothing appears on the expense table.

I want to create a master queries showing where my org is according to budget so I join the tables on Program#, Acct# and Year. My problem is that I want to have all records from my budget table regardless of whether an expense has occurred for the given program#, acct#, and year (If a program doesn't yet have a telephone expense, I want to still show what is budgeted, even though there is no entry in the expense table). However when I try to do a right/left join I get an error saying there are ambiguous outer joins.

I would be grateful for any help you all can provide.

Thanks,
cmayer10
 
Thanks, Skip for responding. I actually just figured it out. I had problems in one of my expense queries that was causing the error when I tried to join it with another table.

Best,
CM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top