Good Afternoon !!
I have a SQL query that pulls data and there is two fields called chargeType and ChargeAmt. The charge could be none or multiple values depending on the order. For example
Data looks like this
Ord# ChargeType# ChargeAmt#
1896 A-123 $89.69
1896 B-589 $239.69
2026 K-789 $123.56
I would want to convert it to as so that there won't be a unique row for an ord#
Ord# Chargetyp1 ChargeAmt1 Chargetyp1 ChargeAmt1 ChargeType3 ChargeAmt3
1896 A-123 $89.69 B-589 $239.69 NULL 0
2026 NULL 0 NULL 0 K-789 $123.56
What would be the best way to do it.