Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hvfalcao
Creator
Creator

Concatenate after LeftJoins

Hello!

I have 4 tables:

PayReceive

PagarMov:

IDPRM,

IDPAGAR,
VLMOV,

DATEMOV;

ReceberMov:

IDPRM,

IDRECEBER,
VLMOV,

DATEMOV;

Pagar:

IDPAGAR,

DATEVENC,

IDCATEGORY;

Receber:

IDRECEBER,

DATEVENC,

IDCATEGORY;

What I'm trying to is:

PagarMov LEFT JOIN Pagar
ReceberMov LEFT JOIN Receber

THEN

PagarMov Concatenate ReceberMov:

TheResult:

IDPRM,

IDPAGAR,

IDRECEBER,

VLMOV,
DATEMOV,

DATEVENC,

IDCATEGORY

After that I´ll need to concatenate to another table again

I'm struggling on this!

Thank you!

1 Solution

Accepted Solutions
maxgro
MVP
MVP

PagarMov:

load * inline [

IDPRM, IDPAGAR, VLMOV, DATEMOV

1,1,1,1

];

Left join (PagarMov)

load * inline [

IDPAGAR,DATEVENC,IDCATEGORY

1,1,1

];

ReceberMov:

load * inline [

IDPRM,IDRECEBER,VLMOV,DATEMOV

2,2,2,2

];

left join (ReceberMov)

load * inline [

IDRECEBER,DATEVENC,IDCATEGORY

2,2,2

];

concatenate (PagarMov)

load * Resident ReceberMov;

DROP Table ReceberMov;

View solution in original post

5 Replies
Anonymous
Not applicable

Sounds achievable.  What bit are you struggling with ?

maxgro
MVP
MVP

PagarMov:

load * inline [

IDPRM, IDPAGAR, VLMOV, DATEMOV

1,1,1,1

];

Left join (PagarMov)

load * inline [

IDPAGAR,DATEVENC,IDCATEGORY

1,1,1

];

ReceberMov:

load * inline [

IDPRM,IDRECEBER,VLMOV,DATEMOV

2,2,2,2

];

left join (ReceberMov)

load * inline [

IDRECEBER,DATEVENC,IDCATEGORY

2,2,2

];

concatenate (PagarMov)

load * Resident ReceberMov;

DROP Table ReceberMov;

hvfalcao
Creator
Creator
Author

Thank you maxgro‌ !!

I wasn't thinking about the Resident Load!

Anonymous
Not applicable

Just as an aside, if you wanted you could avoid the resident load like this.

PagarMov:

load * inline [

IDPRM, IDPAGAR, VLMOV, DATEMOV

1,1,1,1

];

concatenate (PagarMov)

load * inline [

IDPRM,IDRECEBER,VLMOV,DATEMOV

2,2,2,2

];

left join (PagarMov)

load * inline [

IDRECEBER,DATEVENC,IDCATEGORY

2,2,2

];

Left join (PagarMov)

load * inline [

IDPAGAR,DATEVENC,IDCATEGORY

1,1,1

];

hvfalcao
Creator
Creator
Author

Bill,

That's what I've tried at the first time. I don't know why, but it won't result as expected. The last left join won't join correctly.