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

SQL Join Error

Status
Not open for further replies.

VBNewfie

Programmer
Joined
Apr 22, 2002
Messages
2
Location
CA
This SQL statement generates the following error when used on an Access 2000 DB....

Microsoft JET Database Engine error '80040e14'

Syntax error (missing operator) in query expression 'POOL_TEAM_PICKS.PLAYER_ID = POOL_PLAYERS.PLAYER_ID RIGHT OUTER JOIN POOL_TEAMS ON POOL_TEAM_PICKS.TEAM_ID = POOL_TEAMS.TEAM_ID'.

/hockey/pool/stats1.asp, line 19



Here is the SQL statement....

RS.Open "SELECT SUM(POOL_PLAYERS.POINTS) AS PointTotal, SUM(POOL_PLAYERS.GOALS) AS GoalTotal, SUM(POOL_PLAYERS.ASSISTS) as AssistTotal, POOL_TEAMS.TEAM_LNAME, POOL_TEAMS.TEAM_FNAME, POOL_TEAMS.TEAM_ID, POOL_TEAMS.TEAM_NAME FROM POOL_TEAM_PICKS INNER JOIN POOL_PLAYERS ON POOL_TEAM_PICKS.PLAYER_ID = POOL_PLAYERS.PLAYER_ID RIGHT OUTER JOIN POOL_TEAMS ON POOL_TEAM_PICKS.TEAM_ID = POOL_TEAMS.TEAM_ID GROUP BY POOL_TEAMS.TEAM_ID, POOL_TEAMS.TEAM_NAME, POOL_TEAMS.TEAM_LNAME, POOL_TEAMS.TEAM_FNAME;",Con,3



Thanks in advance,

Brian
 
Remove the word "OUTER" in the RIGHT JOIN clause.

I recommend posting Access/JET query questions in forum701 - "Microsoft: Access Queries and JET SQL." Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top