Convert database table values to CSV file format

This application executes a loop within a Global Procedure, reading values from each row of a database table, storing them in an array, then writing those values to a CSV file on each iteration of the loop.