There is an error in the code that Peter posted, it is missing the
AS doc so the statement won't run. If you do not alias a table then you must reference the column by using the full table name. The SQL statement should read:
Code:
SELECT doc.DocumentID, doc.DocumentName,
FROM UserProject AS up, Document AS doc, ProjectDocument AS pd, Project AS p
WHERE doc.DocumentID = pd.DocumentID
AND pd.ProjectID = p.ProjectID
AND up.UserID = 1;
Just a typo I am sure but I though it best to correct for clarity.
Regards
Owain Williams