Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
The output that i want to obtain is the following: if the fieldA = 123 and if the fieldB = 01234, the record must show YES, instead NO. This Is a new fieldC.
FieldA Is in table3, fieldB in the table2, FieldC in table1.
Table1 and table2 have a Key field KeyA, table2 and table3 have a key field KeyB.
What Is the right expression?
Thanks,
Mattia
Table1:
load * inline [
KeyA,column1,column2,
123,test1,test2
234,test3,test4
];
JOIN
Table2:
load * inline [
KeyB,KeyA,FieldB
abc123,123,01234
abc234,234,00000
];
join(Table1)
Table3:
load * inline [
KeyB,FieldA
abc123,123
abc234,234
];
tempTable1:
load *,if(FieldA='123' and FieldB='01234','YES','NO') as FieldC
resident Table1;
drop table Table1;
Table1:
load * inline [
KeyA,column1,column2,
123,test1,test2
234,test3,test4
];
JOIN
Table2:
load * inline [
KeyB,KeyA,FieldB
abc123,123,01234
abc234,234,00000
];
join(Table1)
Table3:
load * inline [
KeyB,FieldA
abc123,123
abc234,234
];
tempTable1:
load *,if(FieldA='123' and FieldB='01234','YES','NO') as FieldC
resident Table1;
drop table Table1;