Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a doubt to get clarified
Am i on the right track using "No Concatenate".?????
1:
Load A, B from xyz;
No Concatenate
2:
Load A, B from abc;
No Concatenate
3:
Load * Resident 1;
Outer Join
Load * Resident 2;
Drop Tables 1,2;
Data granularity point of view, you need to combine the data.
Perfect dathu.
I'm trying that now.
//-------------------------------------//
//if both tables has same field names and same number of fields or different field names//
1:
load * inline [
A,B
1,10
2,20
3,30
];
2:
NoConcatenate
load * inline [
A,B
4,40
5,50
6,60
];
3:
NoConcatenate
Load * Resident 1;
Outer Join
Load * Resident 2;
Drop Tables 1,2;
store 3 into 3.qvd(qvd);
drop table 3;
//-------------------------------------//
//-------------------------------------//
//if both tables has same field names and same number of fields//
1:
load * inline [
A,B
1,10
2,20
3,30
];
2:
//concatenate //can use concatenate or just leave it alone//
load * inline [
A,B
4,40
5,50
6,60
];
store 1 into 1.qvd(qvd);
drop table 1;
//-------------------------------------//
try above.
Hi, Mark Graham.
Already that objective is tables join, I would suggest make direct the outer join. For example:
Table1:
Load
A,
B
from xyz;
Outer Join (Table1)
Table2:
Load
A,
B
from abc;
I would use the NoConcatenate this example:
Table1_tmp:
Load
A,
B,
#Quantity
from xyz;
Outer Join (Table1_tmp)
Table2:
Load
A,
B,
C,
#Quantity
from abc;
NoConcatenate
Table1:
Load
A,
B,
C,
if(#Quantity < 0,0, #Quantity) As#Quantity //Here the condition involves the entire table.
Resident Table1_tmp;
Drop table Table1_tmp;
Hope this helps!
If you get the answer please mark thread as answered.
Yes it is but if we have different field name then it would be considered new field in case of sql union we both both table should have no. of supplied fields would be same