Toad World® Forums

Exporting to Fixed Width File with different widths per row

Hello Everyone:

I have to generate a fixed width file that has 2 firsts rows of data with a defined structure different from the “main body” of the document. Do you have any idea on how to generate such a file?

First line is a ID Register (to identify my customer)

Second Line is a ID FILE to identify the kind of information expected in the main body.

Third and following lines are the main body where the information is contained.

I have thought I could export this in 3 steps… but I dont see any “append” option when exporting FIL files.

Another option would be to export this into 3 files and run a script that merge the 3 files in the correct order…

Anyway, wondering if there is a straightforward way of doing this.

Regards,

Pelayo

Your option of appending the 3 files together can be done via automation where you can control the order of what gets appended. One other thing you can do is output 1 column of all string and use a union all for the next two queries. It is a pain building a long fixed width string but it can work.