search authors sql help?


I need help with the sql.

I have a tblAuthor(authorid, surname,givenname)

I am trying to find all other authors(coauthors) who worked on the same publcation with given an authorid.

ex) coauthors of author1 are 2,3,4,5
      coauthors of author2 are 1,5,7
     coauthors of author3 are 1,4
     coauthors of author4 are 1,3  etc
      publication1, author1,author3,author4  
      publciation2, author1,author2,author5
      publication3, author2,author1,author7

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Select AuthorId
From tblassociation
where pubid in
(Select pubid from tblassociation
Where authorid= [enter author id]
I missed a closing parenthesis in that:

Select AuthorId
From tblassociation
where pubid in
(Select pubid from tblassociation
Where authorid= [enter author id])
An alternative which might have better performance:

FROM tblassociation
(SELECT pubid FROM tblassociation
WHERE authorid= [enter author id]) AS a
ON tblassociation.PubID = a.PubID

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dkim18Author Commented:
I think that's what I got.

SELECT Affiliation.AuthorID, Author.Surname, Author.Given_Name
FROM Author INNER JOIN Affiliation ON Author.AuthorID = Affiliation.AuthorID
WHERE (((Affiliation.PublicationID) In (SELECT Affiliation.PublicationID FROM Affiliation WHERE Affiliation.AuthorID=[xxxx])));

Thanks for checking it out.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.