How can I use this script on a DTS in order to export all records from the Customers table keeping the format "5100717REF" and adding the CustomerID as variable to get the different rows on the table to the export file.

Example:

The expected result is a text file containing all table rows:-------------------

The only thing I need now to solve/investigate is how to change the format of the selected record, i.e., I need "CustomerID" to have 15 fixed positions (char15) and "ContactName" and "Address" with char(35) when exported.