Help with derived or sub SQL query

I have a rather large query with outer joins that based on what column you choose you get a different result.. The customer wants three different choices on one line.. You will have to see my attached example to understand what I want.. How can I take the three queries and match them by account number to get the three different columns on one record per account number? See attached..
Example.xls
LVL 1
cheryl9063Asked:
Who is Participating?
 
puttsConnect With a Mentor Commented:
SELECT A.ACCOUNTNUM,A.[...],B.[...],C.[...]
FROM
     (SELECT [...] FROM [....] OUTER JOIN [...]) A
INNER JOIN
     (SELECT [...] FROM [....] OUTER JOIN [...]) B ON A.ACCOUNTNUM = B.ACCOUNTNUM
INNER JOIN
     (SELECT [...] FROM [....] OUTER JOIN [...]) C ON A.ACCOUNTNUM = C.ACCOUNTNUM

Is that, basically, what you are looking for?


0
 
jaan33Commented:
Do the three example query results exists in the same tables? If so, can Prev & Req values be group by type? If the answer is yes, then use a pivot

Otherwise Putts response will work
0
 
cheryl9063Author Commented:
Thanks!
0
All Courses

From novice to tech pro — start learning today.