Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
How to fetch all records from another table based on wildmatch match .
Input1 |
Al Nino Effect |
Fhad International |
Petro SBM LTD |
AXN Alpha Business Management |
GainX |
Busnos |
Bina Hex Nino Trip |
Gornrs Business Firm |
Capital Managerment |
Birech Minima Capital |
Bank of Am |
Input2 |
Nino |
Capital Bank |
ASAD Fhad Corp |
SBM |
Purple Business Management |
GainX |
Alnox Busnos Peter |
Capital DAX Management |
Output
Input2 | Search Result1 | Search Result2 | Search Result3 |
Nino | Al Nino Effect | Bina Hex Nino Trip | |
Capital Bank | Capital Managerment | Birech Minima Capital | Bank of Am |
ASAD Fhad Corp | Fhad International | ||
SBM | Petro SBM LTD | ||
Purple Business Management | AXN Alpha Business Management | ||
GainX | GainX | ||
Alnox Busnos Peter | Busnos | ||
Capital DAX Management | Capital Managerment | Birech Minima Capital | AXN Alpha Business Management |
Thank you
Hi,
one solution might be:
tabInput1:
LOAD RecNo() as ID1,
Input1
FROM [https://community.qlik.com/t5/QlikView-App-Dev/How-to-fetch-all-records-from-another-table-based-on-wildmatch/td-p/1845362] (html, codepage is 1252, embedded labels, table is @1);
tabInput2:
LOAD RecNo() as ID2,
Input2
FROM [https://community.qlik.com/t5/QlikView-App-Dev/How-to-fetch-all-records-from-another-table-based-on-wildmatch/td-p/1845362] (html, codepage is 1252, embedded labels, table is @2);
mapInput2:
Mapping
LOAD SearchString,
'@start@'&Concat(ID2,',')&'@end@'
Group By SearchString;
LOAD SubField(Input2,' ') as SearchString,
ID2
Resident tabInput2;
tabSearchResults:
LOAD Distinct
*,
'Search Result'&AutoNumber(ID1,ID2) as SearchResult;
LOAD ID1,
SubField(ID2,',') as ID2;
LOAD ID1,
TextBetween(MapSubString('mapInput2',Input1),'@start@','@end@',IterNo()) as ID2
Resident tabInput1
While IterNo() <= SubStringCount(MapSubString('mapInput2',Input1),'@start@');
hope this helps
Marco
@tresesco .. Sir , please help . You have helped me earlier .
Hi,
maybe one solution could be:
https://community.qlik.com/t5/QlikView-App-Dev/Load-script-find-value-from-one-table-as-substring/m-...
hope this helps
Marco
Thank You Marco for sharing .
It definitely gave me direction to proceed .
But being amateur in Qlik not sure how to reach to my required solution .
Following are considerations :
a) Has to be achieved as script level only
b) number of columns Search Result1,2,3,4 .... n ; of OUTPUT table is not fixed as its based on search ( a particular keyword has can have more than 10 matches ) .
Is there any other way ?
Hi,
one solution might be:
tabInput1:
LOAD RecNo() as ID1,
Input1
FROM [https://community.qlik.com/t5/QlikView-App-Dev/How-to-fetch-all-records-from-another-table-based-on-wildmatch/td-p/1845362] (html, codepage is 1252, embedded labels, table is @1);
tabInput2:
LOAD RecNo() as ID2,
Input2
FROM [https://community.qlik.com/t5/QlikView-App-Dev/How-to-fetch-all-records-from-another-table-based-on-wildmatch/td-p/1845362] (html, codepage is 1252, embedded labels, table is @2);
mapInput2:
Mapping
LOAD SearchString,
'@start@'&Concat(ID2,',')&'@end@'
Group By SearchString;
LOAD SubField(Input2,' ') as SearchString,
ID2
Resident tabInput2;
tabSearchResults:
LOAD Distinct
*,
'Search Result'&AutoNumber(ID1,ID2) as SearchResult;
LOAD ID1,
SubField(ID2,',') as ID2;
LOAD ID1,
TextBetween(MapSubString('mapInput2',Input1),'@start@','@end@',IterNo()) as ID2
Resident tabInput1
While IterNo() <= SubStringCount(MapSubString('mapInput2',Input1),'@start@');
hope this helps
Marco
Thank You MarcoWedel , this really worked .
you're welcome
glad it helped