Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
mwscott1
Creator
Creator

Partial Data Match

I am trying to find a way to match data based on a partial match. I have two tables (table A and table B). Table A contains a specific column of data and Table B contains a column of data with a guid that contains the specific piece of data from Table A. The problem is the piece of data I am trying to match appears at different locations in each guid so I can not specify where to start looking in the guid in my load statement. Also the data in the guid might have an - or a letter attached.

Table A

Table B

654011

654011-4-654011-4-2DTSA81181.txt

704476

-704476-704476-1DTSA10620.txt

719585

RCR-2GTSA11344-RL719585A-2GTSA11344.txt

5 Replies
avinashelite

Hi Melvin,

Use wildmatch () function.

MK_QSL
MVP
MVP

What you want to do after finding the Table A field in Table B ?

mwscott1
Creator
Creator
Author

The data in Table A corresponds with a persons name, so if I can match the data I can get the list of people.

maxgro
MVP
MVP

try this

TableA:

load * inline [

f1

654011

704476

719585

];

join (TableA)

load * inline [

f2

654011-4-654011-4-2DTSA81181.txt

-704476-704476-1DTSA10620.txt

RCR-2GTSA11344-RL719585A-2GTSA11344.txt

];

Table:

NoConcatenate

load *

//WildMatch(f2, '*' & f1 & '*') as match

Resident TableA

where WildMatch(f2, '*' & f1 & '*');

DROP Table TableA;

MK_QSL
MVP
MVP

T1:

Load * Inline

[

  Short

  654011

  704476

  719585

];

Join

T2:

Load * Inline

[

  Long

  654011-4-654011-4-2DTSA81181.txt

  -704476-704476-1DTSA10620.txt

  RCR-2GTSA11344-RL719585A-2GTSA11344.txt

];

NoConcatenate

Final:

Load Short, Long Resident T1

Where Index(Long, Short)>0;

Drop Table T1;