yesubabu k

yesubabu k

  • 1.1k
  • 644
  • 63.4k

convert rows into columns

Mar 3 2024 5:19 PM

Dear experts,

kindly help me to get data like below

from 

 Select customer_number [Customer Number],customer_Name [Customer Name],Collector [Collector],clrno [CLR No],Clrdate [CLR Date],commitment_amount [Commitment Amount]    
 ,Commitment_Date [Commitment Date] ,Receipt_Date [Receipt Date]  
 From  (    
Select     
 cm.customer_number,cm.customer_name,c.name as Collector,h.header_id clrno,Format(h.creation_date ,'dd-MMM-yyyy') Clrdate,cml.commitment_amount      
,Format(cml.commitment_date ,'dd-MMM-yyyy') Commitment_Date ,Format(cml.receipt_date ,'dd-MMM-yyyy')  Receipt_Date    
From   CLRHdrs h    
Inner join   CustomerMasters cm on h.customer_id=cm.customer_id    
Inner join   ClrCommitmentLogs cml on h.header_id=cml.clr_id    
inner join   Collectors c on h.collector_id=c.collector_id    
  
Where  -- h.header_id=156000 


Answers (4)