2 Replies Latest reply: Dec 23, 2011 5:09 AM by hernandez RSS

    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*;