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

Inner Join Complexity problem

Status
Not open for further replies.

Nematoth

Programmer
Mar 29, 2002
48
MY
Hi,

I have three tables in access:

project
-------
project_number
project_name
status
completion_date

users
-----
uid
pwd
role

proj_users
----------
pid
project_number
uid


And I have the following query made up in access to give me all the projects that 'tommy' is working on:

SELECT proj_users.project_number, project.project_name, project.completion_date, project.status
FROM project
INNER JOIN (users
INNER JOIN proj_users
ON users.uid=proj_users.uid)
ON project.project_number=proj_users.project_number
WHERE (((users.uid)="tommy"));


When I paste this into MySQL it doesn't work and I get the following error:

ERROR 1064: You have an error in your SQL syntax near '(users INNER JOIN proj_users ON users.uid=proj_users.uid) ON project.project_num' at line 2


Does anyone have any suggestions to resolve this? Any help would be greatly appreciated!

Cheers
Thomas Shearer
Multimedia Developer
 
SELECT proj_users.project_number, project.project_name, project.completion_date, project.status
FROM project INNER JOIN proj_users ON project.project_number=proj_users.project_number
inner join users ON users.uid=proj_users.uid
WHERE users.uid = 'tommy'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top