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
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
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.
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Can You show your working query with 2 tables and the structure of the 3rd table?
Avatar of sameer2010
sameer2010
Flag of India image

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

Microsoft SQL Server 2008
Microsoft SQL Server 2008

Microsoft SQL Server 2008 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. Major improvements include the Always On technologies and support for unstructured data types.

50K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo