Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to use Concatenate and Left Join together.
Below is the Current query:
A:
Load
x,y,z
from Table1;
Concatenate
Load
x,y,z
Resident Table2;
Now I want to Left Join on Table2 with Table 3
A:
Load
x,y,z
from Table1;
Concatenate
B:
Load
x
Resident Table 3
Left Join (B)
Load
x,y,z
Resident Table2;
--Gives an error Cannot find table Left Join (B);
Please let me know how to use Concatenate and Left join in the query.
Hi Deepika,
When you concatenate tables and load them at the same time, it doesn't matter that you named it, it wont store as a different table
Do this to get the tables.
A:
Load
x,y,z
from Table1;
B:
Load
x
Resident Table 3
Concatenate(A)
Load
x
Resident B;
This way, you'll have the table B loaded, which will be concatenated afterwards to A.
It's top-down execution. Table B doesn't exist since that has already been concatenated with A. Try like:
B:
Load
x
Resident Table 3
Left Join (B)
Load
x,y,z
Resident Table2;
Concatenate
A:
Load
x,y,z
from Table1;
Thank you Felip for your quick reply.
I am trying to load
Table B into table A
But there is Left join on Table B with Table2 as I want to considered all records from Table2.
Hi have a loook at below script and also attached qvf file
Table3:
load * Inline [
X
2
3
4
5
6
];
Left Join (Table3)
Table2:
load * Inline [
X,Y,Z
2,b,b2
3,c,c3
4,d,d4
];
NoConcatenate
Load * Resident Table3;
drop Table Table3;
Concatenate
Table1:
load * Inline [
X,Y,Z
1,a,a1
2,b,b2
3,c,c3
];