Monday, 24 September 2018

Customer Master Data with all feilds

Q:-Customer Master Data with all feilds 

Ans:-select DISTINCT t0.CardCode as CustomerCode,t0.CardName as CustomerName,t1.GroupName,T2.SlpName as SalesEmployee,
 t0.CntctPrsn ContactPersion,
 T3.Tel1 as Telephone1,T3.Tel2 as Telephone2,T3.E_MailL,T4.Address as BillToAddress,T4.Street as BillToStreet, T4.Block as BillToBlock,
  T4.City as BillToCity,T4.State as BillToSTATE,
 T4.ZipCode as BillToZipCode, T4.Country AS BillTOCountry,T5.Address as ShipToAddress,T5.Street as ShipToStreet, T5.Block as ShipToBlock,
  T5.City as ShipToCity,T5.State as ShipToSTATE,
 T5.ZipCode as ShipToZipCode, T5.Country AS ShipTOCountry
from ocrd t0
inner join ocrg t1 on t1.GroupCode=t0.GroupCode
INNER JOIN OSLP T2 ON T2.SlpCode = T0.SlpCode
INNER JOIN OCPR T3 ON T3.CardCode = t0.CardCode
INNER JOIN CRD1 T4 ON T4.CardCode =T0.CardCode and T4.AdresType='B'
INNER JOIN CRD1 T5 ON T5.CardCode =T0.CardCode and T5.AdresType='S'




No comments :

Post a Comment