troubleshooting Question

Large SQL Query

Avatar of adskarcox
adskarcoxFlag for United States of America asked on
Microsoft SQL ServerMicrosoft SQL Server 2008SQL
6 Comments4 Solutions387 ViewsLast Modified:
Hello, I am working to build a fairly large and complex SQL Query.  Sample tables for this query are listed below.

ID    OwnerID    StatusID

1      44                777

ID           FirstName    LastName

44           John             Smith

ID             StatusText

777           Active
555           Inactive

ID        PortfolioID     CarName

5555    44                   Mustang
6666    44                   Camero

This is the row that I need to retrive from the database:

OwnerFullName  OwnerCar1    OwnerCar2    OwnerPortfolioStatusText
John Smith             Mustang         Camero            Active

Any assistance would be greatly appreciated.

Environment: SQL Server 2008
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 4 Answers and 6 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 4 Answers and 6 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