troubleshooting Question

multiple column information in one stored procedure

Avatar of attipa
attipaFlag for United States of America asked on
Microsoft SQL Server
4 Comments1 Solution212 ViewsLast Modified:
i have the following stored procedure right now....

select i.PGImageID, i.Headline, i.Description, i.PGImageURL
from PGImage i
Inner Join PGGallery g ON i.PGImageID = g.Image1

Where g.GalleryID = (Select TOP 1 GalleryID From PGGallery ORDER BY DateAdded DESC)


The PGGallery table has the following columns: Image1, Image2, Image3, Image4, Image5
I am trying to get the information for each image like I have done for Image1 in the stored procedure above.
Is this possible to do it all in one stored procedure???  Please, someone help me asap because i am on a tight deadline.

thanks in advance
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 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 4 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