https://sqlrelease.com/avoid-use-of-while-loops-to-get-a-comma-seperated-list-of-rows
Avoid Use of While Loops to get a Comma Seperated list of rows