Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have 4 tables:
Pay | Receive |
---|---|
PagarMov: IDPRM, IDPAGAR, DATEMOV; | ReceberMov: IDPRM, IDRECEBER, 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!
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;
Sounds achievable. What bit are you struggling with ?
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;
Thank you maxgro !!
I wasn't thinking about the Resident Load!
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
];
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.