Discussion Board for collaboration related to QlikView App Development.
I have 2 files where in one file i have a string and in other file have keyword. if Keyword is exists in string then will get the country.
How can i compare 2 files?
PFA of sample files.
Here is one way. This method would include all hints, not just the 'first' one. How many records in each file ?
1 as JoinKey
(ooxml, embedded labels, table is Sheet1);
drop table String;
Solution using Keepchar function:
LOAD ID, String FROM String.xlsx (ooxml, embedded labels, table is Sheet1);
LOAD Text, Country FROM Mapping.xlsx (ooxml, embedded labels, table is Sheet1);
NoConcatenate LOAD * Resident Table1 Where KeepChar(String, Text)=Text;
DROP Tables Table1;
My 'String' file has many values, this logic is not working for me. Here we are using mapping file to get all the countries from string file. It has thousands of strings. Can you please tell me how can i do this?
Re: Mapping question. Linking two tables
Cartesian products are bad
This problem begs for use of MapSubstring. It does not get used too often, so all the more reason 😉
From Mapping.xlsx (ooxml, embedded labels, table is Sheet1);
Mid(splitString, Index(splitString,'.')+1) as Country
Where Index(splitString, '.');
Subfield(mappedString, ';') as splitString
MapSubstring('map', String) as mappedString
From String.xlsx (ooxml, embedded labels, table is Sheet1);
Above code assumes your strings do not contain dots and semicolons. Choose your own delimiter chars if this is not the case.