Toad World® Forums

Export Data to flat file using specification file.


#1

I am trying to export data from a table into a flat file so that I can run it through another interface. To do this, the flat file must be in the interface file format and I thought I could use the specification file to make it. Problem is, I cannot seem to crack the specification file. Could anyone please tell me or point me to directions on how to create the specification file?

The documentation on dell website says refer to sample specification file, and I can’t find the sample.

http://documents.quest.com/DOC98491


#2

Just click “Generate columns” and that will create a specification file for you. Then you can click “Save Spec file”, and go to the next tab to enter a data file name, then click execute.

Here’s a sample. After the column name, the first digit defines where to start in that column (normally 1 unless you want to cut off some of the leading characters). The 2nd digit is the position in the output line where that data will start. The 3rd digit is the max length of the data in that column.

LINESPERRECORD=1

COL1=EMPNO,1,1,5

COL2=ENAME,1,7,10

COL3=JOB,1,18,9

COL4=MGR,1,28,5

COL5=HIREDATE,1,34,19

COL6=SAL,1,54,9

COL7=COMM,1,64,9

COL8=DEPTNO,1,74,3


#3

Thank you. I am trying it out now. I will let you know how it goes.