0

I have a table with the following columns:

Batch_Number, RM_Code, RM_Qty, RM_Lot_Number

The table has multiple records because a Batch_Number may use an RM_Code (Raw Material Code) from different RM_Lot_Number and loading of RM_Code, the ingredients, are at different stages of a batch cook, where each load of ingredient has a record. Please help me with an SQL statement, or any other solution other than looping because it takes long, that will display the following:

Batch_Number, RM_Code, Total_RM_Qty, Comma_Separated_List_Of_Unique_RM_Lot_Number

I am using Classic ASP. Please note also that STRING_AGG does not work in Microsoft Windows 2000 Server Service Pack 4 that I am using. Thank you.

  • Does this answer your question? [Optimal way to concatenate/aggregate strings](https://stackoverflow.com/questions/13639262/optimal-way-to-concatenate-aggregate-strings) – Charlieface Jan 13 '21 at 01:16
  • 1
    Classic ASP? Is that still even a thing? – Mitch Wheat Jan 13 '21 at 01:43
  • On Charlieface: The FOR XML PATH does not work also in MS Windows 2000 Server. – Dante Valenzuela Jan 13 '21 at 02:35
  • On Mitch Wheat: Yes, it is a reality. Some are indeed collector or preserver of "antiques", and if they find a solution for the thing to function in the present time in acceptable manner or efficiency, then immeasurable contentment and happiness comes naturally :). – Dante Valenzuela Jan 13 '21 at 02:53
  • along with all the security vulnerabilities that won't be fixed,..... – Mitch Wheat Jan 13 '21 at 06:02

0 Answers0