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
ASKER CERTIFIED SOLUTION
Nightman
CTO

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 4 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 4 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004