Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello friends,
I have two tables and for both i have created a custom fields names as custom1 and custom2. Now i want to create a new custom field called Custom3 using both custom1 and custom2 which are in two different tables: (custom1*custom2 as custom3).
How can i create this field? Any help will be appreciated.
Table_a:
Name,
marks,
customfield as custom1
from c:........;
Table_b:
Name,
class,
customfield as custom2
Regards
KC
At first You have to join the two tables to have only one, at this point reload this last table (remember noconcatenate)
and write the expression for your field
Hope it helps
Dear,
if the comman key between this two tables Name.
then join these two tables and make them as one table. and create the new field.
else you can use Applymap also.
Thanks,
Mukram.
Try below,
Table1:
LOAD
Name,
marks,
customfield as custom1
from c:........;
Join
LOAD
Name,
class,
customfield as custom2
from d....
Table2:
LOAD
*,
custom1*custom2 as custom3
Resident Table1;
Drop Table Table1;
First table is coming from a single excel sheet , but table 2 is coming from 92 sheets. i am using
SUB DoDir (Root)
FOR each File in filelist(Root& '\*.xlsx')
table2:
Name,
Marks
FROM
[$(File)]
(ooxml, embedded labels, table is Sheet1);
NEXT File
FOR each Dir in dirlist (Root&'\*')
CALL DoDir(Dir)
NEXT Dir
END SUB
CALL DoDir('F:\Project Reporting;
Because of this i am not able join both tables.
Regards
KC
First table is coming from a single excel sheet , but table 2 is coming from 92 sheets. i am using
SUB DoDir (Root)
FOR each File in filelist(Root& '\*.xlsx')
table2:
Name,
Marks
FROM
[$(File)]
(ooxml, embedded labels, table is Sheet1);
NEXT File
FOR each Dir in dirlist (Root&'\*')
CALL DoDir(Dir)
NEXT Dir
END SUB
CALL DoDir('F:\Project Reporting;
Because of this i am not able join both tables.
Regards
KC
First table is coming from a single excel sheet , but table 2 is coming from 92 sheets. i am using
SUB DoDir (Root)
FOR each File in filelist(Root& '\*.xlsx')
table2:
Name,
Marks
FROM
[$(File)]
(ooxml, embedded labels, table is Sheet1);
NEXT File
FOR each Dir in dirlist (Root&'\*')
CALL DoDir(Dir)
NEXT Dir
END SUB
CALL DoDir('F:\Project Reporting;
Because of this i am not able join both tables.
Regards
KC
You can join these tables at any time after the initial load, not only during the initial load. After your code you may write:
join(table1)
load * resident table2;
drop table table2; //if you don't need it any more.
join(table1)
load Name, Marks, custom1*custom2 as custom3 resident table1; //you can join a table to itself.