I need to extract some data but in a specific format. The data that I am extracting is supposed to be matched up to certain specifications. For example if I query the name field the output must be 80 characters in length and even if the name is not that long it has to be padded with spaces. For numberical fields it has to be padded with zeros to the desired length.

Secondly I am restricted my the linesize for my output. The total number of fields I want to extract is 75 and whenever I go beyond a certain linesize the output wraps over to the next line. How can I stop this I need a single record in a line.

I would be greatful to see a PL/Sql code that formats output.

Thank you.