Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data files without column headings

Hi

I have a set of data in pipe-delimited text files, which are extracts from various DBs. These extracts have no column headings.

The column heading definitions have been provided in another set of files as sql field defintiions. These files have this sort of layout:

1 SQLCHAR 0 0 "|" 1 acct_no
2 SQLCHAR 0 0 "|" 2 bil_acct_type
3 SQLCHAR 0 0 "|" 3 id_no
4 SQLCHAR 0 0 "|" 4 sub_no

Considering I'm working with about 200 data files, each with a definition file, I'm looking for a logical way to apply the field defs to the file on load. Can anyone give me an idea?

Thanks a lot!

Brian

1 Solution

Accepted Solutions
martin59
Specialist II
Specialist II

Hi,

Look at the attached QVapp. We have a table with FieldNames and another with datas.

RENAME FIELDS USING ...; rename all fields with datas form the first table.

Hope it helps you

View solution in original post

2 Replies
martin59
Specialist II
Specialist II

Hi,

Look at the attached QVapp. We have a table with FieldNames and another with datas.

RENAME FIELDS USING ...; rename all fields with datas form the first table.

Hope it helps you

Not applicable
Author

Thanks, Martin.

That works!

I am now building up the Mapping table by loading in the files that contain the field definitions. Then I can rename fields in each table as I load it.

Is there any alternative method?

Brian