Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Joining two tables based on wildcard values.

Hi all,

is it possible to make a join using wildcard values? With this code will be easier to understand what I am trying to get:

T1:

LOAD * INLINE [

Account

6%

70%

800%

];

T2:

LOAD * INLINE [

Account, Import

6, 1

7000000, 2

8000000, 3];

Inner Join(T1)

Load

  Account,

  Import

Resident T2;

Drop Table T2;

This code wroked as expected (not how I liked). What I want to get is to join but using wildcard values (70% <-> 7000000) instead of perfect matchs. is it possible? is there any other way? I know Wildmatch() function and the like, but I need the wildcard in the join.

Thanks so much !!!

7 Replies
Anonymous
Not applicable
Author

See an example, maybe it will help you to move in the right direction.

Not applicable
Author

thanks for your answer. It is useful.

However, it's not exactly what I am looking for because it is not replicating the behavior of the wildcard. I mean, if in your solution I change "7000000" by "7060000", the search string "70%" doesn't pick "7060000" up as it should be if it were a real wildcard.

Anonymous
Not applicable
Author

I think the second version is closer to what you want.  It is not effective though for a large data set because I'm creating outer join in an intermediate step, and it could be a rather large table.

Anonymous
Not applicable
Author

One more version - no outer join, that is no large table.  Instead of this, I use loop.  Reload will be slower but takes less memory.

Again, it matters only for a large data set.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I would use "Wildcard Mapping" to do mapping and then join -- or perhaps the mapping is enough. You can find examples of Mapping with Wildcards here

http://qlikviewcookbook.com/recipes/download-info/mapping-with-wildcards/

or as a subroutine in Qlikview Components http://qlikviewcomponents.org

-Rob

Not applicable
Author

Thanks a lot Michael !!!

Not applicable
Author

Thank you !! I'll give it a try. In any case, good to know that it is possible to do this.