Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ABC_123
Contributor
Contributor

Nested Loop

I would like to create a LOAD statement that basically performs a nested loop.  

For the first ID in the Sentence table, scan the OLD_TEXT field to look for the first item in the REMOVE_TEXT field of the WordsToRemove table.  If that words/phrase is found, REPLACE it with blanks ('').  Repeat for each item in the WordsToRemove table until ID (A) is has removed all relevant words.  Then, repeat that process for every item in the ID field.

Is this possible? 

Sentence

ID

OLD_TEXT

A

The car was brown.

B

The car was green.

C

The car was blue.

D

The car was orange.

E

The car was blue green.

F

The car was yellow.

 

WordsToRemove

ID2

REMOVE_TEXT

1

blue green

2

brown

3

blue

4

car

 

Labels (1)
2 Replies
marcus_sommer

It might be done with mapsubstring() - see: Mapping with conditions - Qlik Community - 1981209 and just add '' as return and skip the textbetween().

- Marcus

Ruhulessin
Partner - Contributor III
Partner - Contributor III

Hi @ABC_123 ,

Like @marcus_sommer says, you can use MapSubString to map '' to the words that it can find in the mapping table.
PFA an example.

-Ruben

I have never done it, so I think I can.