Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gr_eldred
Creator II
Creator 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?

21 Replies
vishsaggi
Champion III
Champion III

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.

Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
avinashelite

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

gr_eldred
Creator II
Creator II
Author

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
Champion III
Champion III

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
Creator II
Creator II
Author

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
Champion III
Champion III

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

Anonymous
Not applicable

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
Creator II
Creator II
Author

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