troubleshooting Question

SQL Query "3D" Results

Avatar of Shiny
Shiny asked on
Microsoft SQL Server.NET ProgrammingSQL
2 Comments1 Solution199 ViewsLast Modified:
I am not sure quite how to word this question, I have found it rather difficult to explain and even more so to find the right words to google for.

I have a simple search results page for a few articles that my company has up.  I am implementing a "tag" system for them.  Everything is working, but now on the search results page I would like to display all of the tags for the article.  The way I am doing it now I am sure is not the best or even remotely close.  I get the search results then, for each result, I do another statement to get the list of Tags from the tags table.  Is there a way I can get this into one query?

My results query is as follows:
SELECT tblMagazineArticles.articleID, tblMagazineArticles.title, tblMagazineArticles.description, tblMagazineArticles.subTitle, tblMagazineArticles.oneLiner, tblMagazineSections.sectionTitle, tblMagazineIssues.issueTitle FROM tblMagazineArticles JOIN CONTAINSTABLE( tblMagazineArticles, *, ?) as KEY_TBL ON tblMagazineArticles.articleID = KEY_TBL.[KEY] JOIN tblMagazineSections ON tblMagazineArticles.sectionID = tblMagazineSections.sectionID JOIN tblMagazineIssues ON tblMagazineIssues.issueID = tblMagazineArticles.issueID ORDER BY KEY_TBL.RANK DESC

fairly simple, but then from the ArticleID I perform the other queries to get the related tags.  Any suggestions?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros