Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
riishabhz
Creator
Creator

load multiple txt files using loop

master pic.PNG

hi everyone

i have this master files and they are daily added into this folder 

i have done incremental on this by the help of  @rwunderlich

https://community.qlik.com/t5/New-to-QlikView/incremental-load-on-txt-file-without-date-field/m-p/16...

script is :-

master:
LOAD
*,
RecNo() as RecId
FROM
[..\material master and customer master txt\MAT_MAS_20190731_131746.txt]
(txt, codepage is 1252, embedded labels, delimiter is '|', msq) ;

Inner Join(master)
LOAD EAN, Max(RecId) as RecId
Resident master
Group by EAN
;
DROP FIELD RecId;

now i want to implemet this script in loop so that all files get loaded one by one and compare with each other and load all data in it.

so my question is suppose first file  in image have ean id of 1001010 and mrp is 100 , and last file with same ean have mrp of 200 , so it should load 200 mrp.

hope you get my querry.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Just two changes -- shown in bold -- I would make to the first LOAD statement:

master:
LOAD
*,
RowNo() as RecId
FROM
[..\material master and customer master txt\MAT_MAS*.txt]
(txt, codepage is 1252, embedded labels, delimiter is '|', msq) ;

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Just two changes -- shown in bold -- I would make to the first LOAD statement:

master:
LOAD
*,
RowNo() as RecId
FROM
[..\material master and customer master txt\MAT_MAS*.txt]
(txt, codepage is 1252, embedded labels, delimiter is '|', msq) ;

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com