Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pascal_theurot
Partner - Creator II
Partner - Creator II

Concatenate 2 optimized QVD's

Hello,

When I concatenate the 2 attached QVD's I get unconsistant values in my Date field :

Date.png

I don't have these values in my QVD's.

If I load the same 2 qvd's with the first one not optimized (where 1=1) I get the right values.

Any idea why I have this behavior ?

Pascal
1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

The inconsistant values in Date field might be because qlikview unable to interpret the Dates

you can try like this to yield correct values with appropriate date intrepretation

Fact:

LOAD Article,

    MakeDate(left(Date,4),Mid(Date,5,2),Right(Date,2))as Date,

     Amount

FROM

     Fact1.qvd (qvd);

Concatenate

LOAD

  Article,

  MakeDate(left(Date,4),Mid(Date,5,2),Right(Date,2))as Date,

     0 as Amount

FROM

      Fact2.qvd (qvd);

View solution in original post

4 Replies
aarkay29
Specialist
Specialist

I see that second QVD doesnot have the same fields as in the 1st qvd

Just try Join instead of Concatenate

pascal_theurot
Partner - Creator II
Partner - Creator II
Author

Hi Aar,

If you change the script to have the same fields, you have the same behavior :

Fact:

LOAD Article,

    Date,

    Amount

FROM Fact1.qvd (qvd);

Concatenate

LOAD Article,

    Date,

    0 as Amount

FROM Fact2.qvd (qvd);

same with this code

Fact:

LOAD Article,

    Date

//    Amount

FROM Fact1.qvd (qvd);

Concatenate

LOAD Article,

    Date

FROM Fact2.qvd (qvd);

Pascal
aarkay29
Specialist
Specialist

The inconsistant values in Date field might be because qlikview unable to interpret the Dates

you can try like this to yield correct values with appropriate date intrepretation

Fact:

LOAD Article,

    MakeDate(left(Date,4),Mid(Date,5,2),Right(Date,2))as Date,

     Amount

FROM

     Fact1.qvd (qvd);

Concatenate

LOAD

  Article,

  MakeDate(left(Date,4),Mid(Date,5,2),Right(Date,2))as Date,

     0 as Amount

FROM

      Fact2.qvd (qvd);

pascal_theurot
Partner - Creator II
Partner - Creator II
Author

Aar,

The date in the first QVD is not interpreted as a date field using optimized load but correctly using a non optimized QVD load...

So, using a formula solve the case as I mentionned in my question.

But it's more about to understand the reason.

thanks Aar for your answer

Pascal

Pascal