I have a typical table that looks something like
CustNo State PartNo
1 NJ 60
1 NY 50
2 TN 30
2 KY 45
The CustNo column is not unique but is the key.
I need to create a single row on a spreadsheet or flat file that looks like this
CustNo State1 PartNo1 State2 PartNo2 , etc. for as many rows that are returned.
I can do this programatically with VB or something but I'm wondering if there is a way to do this directly from SQL and avoid all the processing overhead
Thanks in advance
CustNo State PartNo
1 NJ 60
1 NY 50
2 TN 30
2 KY 45
The CustNo column is not unique but is the key.
I need to create a single row on a spreadsheet or flat file that looks like this
CustNo State1 PartNo1 State2 PartNo2 , etc. for as many rows that are returned.
I can do this programatically with VB or something but I'm wondering if there is a way to do this directly from SQL and avoid all the processing overhead
Thanks in advance