Ratakan

Informations :

SP untuk menampilkan PO Number dan Last Receipt Date

select distinct a.PONUMBER as 'PO Number',max(b.receiptdate) as 'Last Receipt Date' from POP10500 a
left join (select POPRCTNM,receiptdate from POP10300 
   union 
     select POPRCTNM,receiptdate from POP30300 ) b on a.POPRCTNM = b.POPRCTNM 

group by a.PONUMBER




Hasilnya : 



No comments