Does someone perhaps know how to get a comma separated list from SQL that doesn't duplicate - it's a little hard to explain. Let me give an example.
I have a list of invoices + the shipment it belongs to in a table like below:
InvoiceNumber ShipmentNumber
0180376000 1stShipment
0180376005 1stShipment
0180376003 1stShipment
0180375997 1stShipment
0180375993 1stShipment
This list needs to be divided up into main InvoiceNumbers followed by the right 2 digits of the remaining invoice numbers. Result should look similar to the below.
01803760, 00, 05, 03, 01803759, 97, 93
At this point I can get the comma separated list fairly easily but cannot figure out how to position the 2 digit after each respective invoice that it belongs to.
Any suggestion of how to do this would be great!!