I have data in my two sample tables Customer(3columns) and CustomerAddress(10columns) as below:
Customer & Customer Address:
Desired Output :
The data should be populated in pivot format and the mapping should be like:
- If address type = “Billing”, then fill the fields starting by “Billing…”
- If address type = “Shipping”, then fill the fields starting by “Shipping…”
- If address type = “Communication”, then fill the fields starting by “Communication…”
How to achieve this output without using a cursor?
Thanks in advance