Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
raadwiptec
Creator II
Creator II

qvd's

hi all,

iam trying to load multiple qvd's- there are totally 3 files

Set vFolder = 'D:\QVD';

for each File in filelist(vFolder& '\*.QVD')

QUALIFY*,;

UNQUALIFY ID;

[QVD multiple]:

LOAD ID,

     Account,

      Month,

     Year,

     Quantity,

      Subscriber,

     [SubscriberGroup],

     [SubscriberPartner],

     [Subscriber Center],

       [Amount ],

    from [$(File)] (qvd);

   UNQUALIFY*;

next File

but my data model is not one.. it is generating 3 different tables . i require one ta

10 Replies
Chanty4u
MVP
MVP

if column names are same try below

LOAD * INLINE

    Field_A, Field_B, Field_C, Field_D

];

FOR EACH vFile in FileList('C:\MYDATA*.qvd')

            CONCATENATE

            LOAD * FROM [$(vFile)] (qvd);

NEXT vFile

pradeep_s
Creator
Creator

Hi Raadqiptec,

Use this code

Set vFolder = 'D:\QVD';

for each File in filelist(vFolder& '\*.QVD')

Temp:

Load

     ID,

     Account,

     Month,

     Year,

     Quantity,

     Subscriber,

     [SubscriberGroup],

     [SubscriberPartner],

     [Subscriber Center],

      [Amount ],

from [$(File)] (qvd);

next File;

********************************************************************************

QUALIFY *;

UNQUALIFY ID;

[QVD Multipe]:

LOAD

  *

Resident

  Temp;

UNQUALIFY *;

Drop table Temp;

Anonymous
Not applicable

Hi

As far as i Know

One table ...one qvd (viceversa).

For you case try some  JOIN in the code itself !!?

Set vFolder = 'D:\QVD';

for each File in filelist(vFolder& '\*.QVD')

QUALIFY*,;

UNQUALIFY ID;

[QVD multiple]:

JOIN

LOAD ID,

Account,

Month,

Year,

Quantity,

Subscriber,

[SubscriberGroup],

[SubscriberPartner],

[Subscriber Center],

[Amount ],

from [$(File)] (qvd);

UNQUALIFY*;

next File

pradeep_s
Creator
Creator

I believe it should be Concatenate

tracysmart
Creator II
Creator II

you are qualifying the tables so the field names will be likely different.

They wont auto-concatenate with the different field names.

You will have to outer join them instead

Anonymous
Not applicable

Hi, Don't use Qualify.

Regards!

raadwiptec
Creator II
Creator II
Author

hi manua

l the probelem is i have already another table with the same fields.. to avoid it iam qualifying as they are not supposed to concatenate

tracysmart
Creator II
Creator II

your original question stated that you wanted one table - if you don't qualify the tables you will get one as they will auto-concatenate, if you qualify you will get multiple.

you could load it without qualifying and specify noconcatenate between them but they will be part of a big synthetic key. You would be able to resident from them or join them later though in your script.

what are you trying to achieve here?

Anonymous
Not applicable

Then, change the names to the fields with as.

Regards!