Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Content of below 2 files merge into 772YYYYMMDD.txt
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;