Avatar of Philky101
Philky101 asked on

need to add col from third table of join

i need to add a col from the third table I need ad.IARCC9                                      

it's not displaying this col. i

select ItQty#,IhDocd,ItPRT# from pklib.Fileout1 a      
ad.IARCC9 from astdta.audia                            
b.CtCom#= a.ItCom# and                                  
b.CtCtr# = ' '     and                                  
b.CtPrt# =a.ItPrt#                                      
join astdta.Audia ad                                    
on ad.IAprt# = a.ItPrt#                                
where ad.IARCC9 > ''                                    
order by ad.IARCC9
Programming Languages-OtherMicrosoft SQL Server 2008

Avatar of undefined
Last Comment
Anthony Perkins

8/22/2022 - Mon
Éric Moreau

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
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
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

can you explain me\ this further. This is getting me output needed. But need the third\ table col on the output.
Éric Moreau

Can You show your working query with 2 tables and the structure of the 3rd table?

The query is unclear, but try this
select ItQty#,IhDocd,ItPRT#, b.IARCC9 from pklib.Fileout1 a
astdta.audia b, third_table c 
 where c.CtCom#= a.ItCom#
and c.CtCtr# = ' '
and c.CtPrt# =a.ItPrt#
and b.IAprt# = a.ItPrt#                                
and b.IARCC9 > ''
order by b.IARCC9 

Open in new window

Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Anthony Perkins