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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi everyone: I have this select

Status
Not open for further replies.

MichHart

Programmer
Dec 14, 2002
56
CA
Hi everyone:

I have this select statement that is joining 3 tables, but it is telling me I have a syntax error in the join?

Anyone pick out what is wrong with this??

Set rs = db.Execute("SELECT Leagues.[Index], Leagues.[ShortName] FROM Leagues INNER JOIN (Leagues INNER JOIN [Teams] ON [Teams].League = Leagues.Index) ON Players.[CurTeam] = Teams.Index GROUP BY ShortName")

Thanks for any help

MichHart " Never regret yesterday because it cannot be changed;
Instead make sure today does not become a regret of tomorrow."
 
Hi!

You use Leagues twice and Players not at all. I think you want Players instead of the first use of Leagues. Also, you will need to add Index to your Group By statement.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top