Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with left join

Hi everybody,

I'm facing an issue while using left join in load script.

I have for example this following script :

Table1:

LOAD A as ID,

    B as mont,

    C

FROM

(ooxml, embedded labels, table is Feuil1);

Data:

LOAD * INLINE [

ID, Type, Value

1, X, 10

2, X, 20

4, Y, 30

];

Left join (Data)

LOAD ID,

    mont - Value as Mont_Value

resident Table1;

My problem is that I can not use the field Value from table Table1 while joining.

Is there a way to do this in qlikview ?

Labels (1)
5 Replies
yvesqlik
Partner - Contributor III
Partner - Contributor III

Bonour,

pour faire l'addition tu dois mettre les deux collones dans un même tableau

Table1:

LOAD A as ID,

    B as mont,

    C

FROM

(ooxml, embedded labels, table is Feuil1);

left join

LOAD * INLINE [

ID, Type, Value

1, X, 10

2, X, 20

4, Y, 30

];

Table2:

nonconcatenate

load

     ID,

     mont,

     Type,

     Value

resident Table1;

Table3:

nonconcatenate

load

     *,

     mont - Value as Mont_Value,

resident Table2;

drop tables Table1, Table2;

Eh voilà!

Cordialement,

Yves

mambi
Creator III
Creator III

Hello,

you can't do  :  mont - Value as Mont_Value because the filed "Value" doesn't belong to Table1 so the solution is :

....

Data:

LOAD * INLINE [

ID, Type, Value

1, X, 10

2, X, 20

4, Y, 30

];

Left join (Data)

LOAD ID, mont
resident Table1;

Final:
LOAD ID, mont -Value as Mont_Value Resident Data;

drop tables Data, Table1

ankitaag
Partner - Creator III
Partner - Creator III

Hello Patrick,

Try this,

Table1:

Load A as ID,

    B as mont,

    C

Inline [

A,B,C

];

left join

Data:

LOAD * INLINE [

ID, Type, Value

1, X, 10

2, X, 20

4, Y, 30

];

Table2:

Load ID,mont-Value as Mont_Value

Resident Table1;

drop table Table1;

Not applicable
Author

Merci çà marche !

ankitaag
Partner - Creator III
Partner - Creator III

Thankyou for marking the answer as helpful..

Can you mark any1 as the correct 1 so as to close this discussion