Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

LIKE in join

Hi Everyone,

How can I replicate the following SQL in QlikView (problem is the like statement):-

select top 1 1
from #ABC a
join #DEF b
on a.Product like '%' + b.Product + '%'

Since QV will join it automatically, how can I join it using LIKE?

6 Replies
tanelry
Partner - Creator II
Partner - Creator II

If your data source is SQL then you could use sql syntax to first load the like-table with all possible matches from sql into a QV mapping table,
then use applymap() in QV script.

Not applicable
Author

Hi!

In QV Star instead [%] in SQL

so expression in SQL a.text like '%default%'

in QV will be a.text like '*default*'

Hope it will help.

Not applicable
Author

My data source now is QVD... so can't use the SQL syntax. 😕

Not applicable
Author

I meen that in QV you can use star ( * ) instead ( % )

You can use it anywhere in QV, in expression, for example.

Not applicable
Author

Hi,

Thanks for the suggestion. But I'm actually referring to Tanel's post.

As for your suggestion, my issue is that I need to do the JOIN in script. As you know, QlikView joins the tables automatically based on the same field name. How can I use * to do a fuzzy/LIKE join?

john_duffy
Partner - Creator III
Partner - Creator III

Hello.

The wildmatch command performs a comparison and allows wildcard characters. I have attached a small sample application using this command when joining two tables.

Let me know if this helps.

John.