Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Highlighted
Contributor

Merge file by groups

I have various text file based on student numbers that I require to merge based on their course number.

//Student+(date)YYYYMMDD

Files Format:

Q12320160112.txt

23466720160112.txt

P276520160114.txt

34520160115.txt

I need to merge above file based on their course number. Course & Studen numbers are provided in input file.

Input File:

Course     Student

543          Q123

543          234667

772          P2765

772          345

Final output will be:

content of below 2 files merged into 543YYYYMMDD.txt

Q12320160112.txt

23466720160112.txt

Content of below 2 files merge into 772YYYYMMDD.txt

P276520160114.txt

34520160115.txt

1 Reply
Highlighted
MVP & Luminary
MVP & Luminary

Re: Merge file by groups

Like this maybe:


543YYYYMMDD:

LOAD * FROM Q12320160112.txt (txt, codepage is 1252, no labels, delimiter is ',', msq) ;

CONCATENTATE (543YYYYMMDD)

LOAD * FROM 23466720160112.txt (txt, codepage is 1252, no labels, delimiter is ',', msq) ;

STORE 543YYYYMMDD INTO 543YYYYMMDD.txt (txt);

DROP TABLE 543YYYYMMDD ;


772YYYYMMDD:

LOAD * FROM P276520160114.txt (txt, codepage is 1252, no labels, delimiter is ',', msq) ;

CONCATENTATE (772YYYYMMDD)

LOAD * FROM 34520160115.txt (txt, codepage is 1252, no labels, delimiter is ',', msq) ;

STORE 772YYYYMMDD INTO 772YYYYMMDD.txt (txt);

DROP TABLE 772YYYYMMDD;


talk is cheap, supply exceeds demand