Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Advanced search between two tables

Hi,

I'd like to ask you if you have any idea how to search values from Table1 into descriptions from Table2 and match them.

In Table2 in texts appear products form Table1.

How to match them?

Of course without copying and pasting values into search box for example: *Product No1* .

Something like look up function?

For example:

Table1:

Product No1

Product No2

Product No3

Product No4

Table2:

I love Product No2

I am interested in Product No1 but I am not sure

Does anyone know if Product No2 is better than Product No4

Product No3 that's it!

Product No1 I'd like to buy

1 Solution

Accepted Solutions

Re: Advanced search between two tables

Here's an approach:

Products:

LOAD Product, RecNo() as ProductId INLINE [

Product

Product No1

Product No2

Product No3

Product No4

]

;

Comments:

LOAD *, recno() as CommentId  INLINE [

Comment

I love Product No2

I am interested in Product No1 but I am not sure

Does anyone know if Product No2 is better than Product No4

Product No3 that's it!

Product No1 I'd like to buy

]

;

ProductMap:

MAPPING LOAD Product, '<'&ProductId&'>'

Resident Products

;

CommentLink:

LOAD

  CommentId

  ,PurgeChar(ProductRef,'<>') as ProductId

WHERE ProductRef LIKE '<*>'

;

LOAD

  CommentId

  ,subfield(MapSubString('ProductMap', Comment),' ') as ProductRef

Resident Comments

;

For aother approach when mapping single words, see

Qlikview Cookbook: Indexing Keywords in Text http://qlikviewcookbook.com/recipes/download-info/indexing-keywords-in-text/

-Rob

http://masterssummit.com

http://robwunderlich.com

2 Replies

Re: Advanced search between two tables

Here's an approach:

Products:

LOAD Product, RecNo() as ProductId INLINE [

Product

Product No1

Product No2

Product No3

Product No4

]

;

Comments:

LOAD *, recno() as CommentId  INLINE [

Comment

I love Product No2

I am interested in Product No1 but I am not sure

Does anyone know if Product No2 is better than Product No4

Product No3 that's it!

Product No1 I'd like to buy

]

;

ProductMap:

MAPPING LOAD Product, '<'&ProductId&'>'

Resident Products

;

CommentLink:

LOAD

  CommentId

  ,PurgeChar(ProductRef,'<>') as ProductId

WHERE ProductRef LIKE '<*>'

;

LOAD

  CommentId

  ,subfield(MapSubString('ProductMap', Comment),' ') as ProductRef

Resident Comments

;

For aother approach when mapping single words, see

Qlikview Cookbook: Indexing Keywords in Text http://qlikviewcookbook.com/recipes/download-info/indexing-keywords-in-text/

-Rob

http://masterssummit.com

http://robwunderlich.com

MVP
MVP

Re: Advanced search between two tables

See attachment, hope to understand your question

Community Browser