I'm so stuck and this seems like it should be so simple.
I have three tables, called Auction Items, Party #1 and Party #2. A bidder number may appear in one, two or all three of them. I'm trying to write a query that will select distinct bidder numbers that appear in one (or more) of the tables. I've found several pieces of code and tried to alter them, to no avail. The Winning Bidder Number field is the only thing I need from each table.
The code says error in From Clause, but I can't find anything wrong from what I copied from Microsoft's web site. When I created an exact duplicate of their example, it still said that. I also haven't tried to add in the Party #2 table since I couldn't get it to work with just the first one. Here it is:
Expand|Select|Wrap|Line Numbers
- SELECT DISTINCT [Auction Items].[Winning Bidder Number], [Party #1].[Winning Bidder Number]
- FROM {oj Auction Items LEFT OUTER JOIN ON [Auction Items].[Winning Bidder Number] = [Party #1].[Winning Bidder Number]}
- UNION SELECT DISTINCT [Auction Items].[Winning Bidder Number],
- FROM {oj Auction Items LEFT OUTER JOIN [Party #1] ON [Auction Items].[Winning Bidder Number] =[Party #1].[Winning Bidder Number]}