Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table loop

Hi,

I'd tried to import a list of txt-files. The numbers of documents is variable. After I execute this script, qlikview generate a lot of tables called "qlik_details", "qlik_details-1", "qlik_details-2" and so on. The problem is, that we need all the data in one table called "qlik_details".

I tried to handle this with "resident", but it does not work.

Any ideas?

Many thanks,

Hernandez

Sub DoDir (Root)

          For Each Ext In 'txt'

                    For Each vFile In FileList (Root & '\*CPG_CLICK_DETAIL*.' & Ext)

                              qlik_details:

                              QUALIFY*;

                              Load

                              CAMPAGNE_ID,

                               MEMBER_ID,

                         CLIENT_ID,

      SEGMENT,

                         SOURCE, 

                         UPLOAD_ID

                              FROM $(vFile)

                              (txt, utf8,embedded labels,delimiter is ';', msq);

                    Next vFile

          Next Ext

          For Each Dir In DirList (Root & '\*') // Subfolders

                    Call DoDir (Dir)

          Next Dir

End Sub

Call DoDir ('D:\Files\ClientFolder'); // Folder

UNQUALIFY*;

1 Solution

Accepted Solutions
forte
Partner - Creator
Partner - Creator

Hi Hernandez ,

You can't use qualifying in this context. You are changing the field's names on each loop, so Qlikview is not able to make the implicit concatenate (as you it's only done when both tables have the same number of fields and the same names for them).

Try to avoid qualify (and unqualify) sentence and it will work.

Hope it helps

Regards

View solution in original post

2 Replies
forte
Partner - Creator
Partner - Creator

Hi Hernandez ,

You can't use qualifying in this context. You are changing the field's names on each loop, so Qlikview is not able to make the implicit concatenate (as you it's only done when both tables have the same number of fields and the same names for them).

Try to avoid qualify (and unqualify) sentence and it will work.

Hope it helps

Regards

Not applicable
Author

It works!


Thanks!