Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Multiple Loops

Hi everyone,

Need some help here.

Imagine that i load 2 tables and want to loop values from the first one in the second one, is that possible?

table1:

load a // String

from ...

table2:

load b // Specific Date

from...

Now i want for each value of a to get all of Data values in b

I thought to do something like to loops but dont know if is possible.

for i = 1 noofrows(table1)

for ii= 1 noofrows(table2)

Not lucky..

Can someone help me?

Regards,

EM

2 Replies
clisboa_noesis
Contributor

Multiple Loops

Hi EM,

I believe you need only to use the exists on the where clause.

Something like:

table1:

load a // String

date(a,'FORMAT') as key

from ...

table2:

load b // Specific Date

b as key

from...

where exists(key);

You need to pay attention to the date format, the key field should be in equal format.

Regards,

Carlos

Not applicable

Multiple Loops

Thanks.

In the case that i have,

Load Id

        Name

from..

Imagine that i have one ID with 2 names and i want to load the first Name of each ID any suggestion?

Thanks,

EM

Community Browser