Link to home
Create AccountLog in
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
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Philky101
Philky101

ASKER

can you explain me\ this further. This is getting me output needed. But need the third\ table col on the output.
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