I would like to know how to write query that can append a comma to a text-field for all records selected except for the final record.
I want to create a generic function which can wrap a query to create enumeration assignment statements for C# and TypeScript. Here's a generic query:
SELECT ATextField, AnIntegerField
FROM table1 join table2 .... join tableN
The wrapper function should return distinct values sorted by the text field in the following format:
TextValue1 = 15,
TextValue2 = 3,
...
TextValueN = 128 --No comma here on the final record