Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
gr_eldred
Contributor II

left join of two QVDS

Is there an error in this syntax? I need to make a left join between these two qvds.

Let vVtaSemanaDía = date(today(), 'YYYYMMDD');

tmp_vta_6W$(vVtaSemanaDía):

Load

%Pto_vta_ID,

Clasificación,

Cant_Estandar_Act6W

FROM

Transformación\Fact\tmp_Vta_Act_6W.qvd (qvd);

Left Join

LOAD

%Pto_vta_ID,

Clasificación,

Cant_Estandar_Ant6W

FROM

Transformación\Fact\tmp_Vta_Ant_6W.qvd (qvd);

Can you help me?

Tags (2)
21 Replies
vishsaggi
Esteemed Contributor III

Re: left join of two QVDS

May be you want to try like below:

tmp_vta_6W$(=vVtaSemanaDía):

Load

%Pto_vta_ID,

Clasificación,

Cant_Estandar_Act6W

FROM

Transformación\Fact\tmp_Vta_Act_6W.qvd (qvd);

Left Join

LOAD

%Pto_vta_ID,

Clasificación,

Cant_Estandar_Ant6W

FROM

Transformación\Fact\tmp_Vta_Ant_6W.qvd (qvd);

However, just curious you know right if you do left join it will load all values from Left table and only matching values from right table. IF there are no matches it will not load.

May be you would want to do a concatenate as the field names are same.

Re: left join of two QVDS

Why are you going to have Left Join, Because i don't think you need Joins here due to single table..

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Re: left join of two QVDS

I don't see any error in the syntax ....are you facing any issue ?

gr_eldred
Contributor II

Re: left join of two QVDS

yes, I have a problem with this syntax I need to create a qvdde this table, but I can not generate it because it has this variable, can you help me?

vishsaggi
Esteemed Contributor III

Re: left join of two QVDS

Did you try the one i mentioned in my first msg? If yes what is happening? Any error again or please let me know if have missed anything.

gr_eldred
Contributor II

Re: left join of two QVDS

if I already probe it and it works well my problem is like generating a qvd with the name of the table that brings the variable

vishsaggi
Esteemed Contributor III

Re: left join of two QVDS

Can you share the script and highlight where exactly you are having problems with? An error snapshot would help?

atkinsow
Valued Contributor II

Re: left join of two QVDS

Are you getting an error message?  What is it?  A left join on the same table doesn't make sense.

Addressing the variable name directly you could try a static table name and then rename it.:

Let vVtaSemanaDía = 'tmp_vta_6W' & date(today(), 'YYYYMMDD');

tmp_vta_6W:

Load

%Pto_vta_ID,

Clasificación,

Cant_Estandar_Act6W

FROM

Transformación\Fact\tmp_Vta_Act_6W.qvd (qvd);

Left Join(tmp_vta_6W)


LOAD

%Pto_vta_ID,

Clasificación,

Cant_Estandar_Ant6W

FROM

Transformación\Fact\tmp_Vta_Ant_6W.qvd (qvd);

Rename Table tmp_vta_6W to $(vVtaSemanaDía);

gr_eldred
Contributor II

Re: left join of two QVDS

I need to create a qvd with this table name

is it right to do this?

tmp_vta_6W$(=vVtaSemanaDía):

Load

%Pto_vta_ID,

Clasificación,

Cant_Estandar_Act6W

FROM

Transformación\Fact\tmp_Vta_Act_6W.qvd (qvd);

Left Join

LOAD

%Pto_vta_ID,

Clasificación,

Cant_Estandar_Ant6W

FROM

Transformación\Fact\tmp_Vta_Ant_6W.qvd (qvd);

Store tmp_vta_6W$(vVtaSemanaDía) into [..\1_QVDs\Transformación\Fact\Temp\tmp_vta_6W$(vVtaSemanaDía).qvd](qvd);