Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please let me know how to implement drop field dynamically
Example :
Table 1:
Region Customer
A ABC
B BDE
Table2:
Region Customer
* ABC
B *
Drop field based on the Table 2 entry,
example:
first time it has to drop region field from Table 1 , bcoz * is entered in Table 2 Region Field
Second time it has to drop Customer field from Table 1 , bcoz * is entered in Table 2 Customer Field
Thanks in advance
May be this?
Table1:
Load * Inline [
Region, Customer
A, ABC
B, BDE
];
Qualify *;
Table2:
Load * Inline [
Region ,Customer
* ,ABC
B ,*
];
Final:
NoConcatenate
If Table2.Region = '*' or Table2.Customer = '*' Then
Drop Field Table2.Region;
Else
Drop Field Table2.Customer;
Can you explain real scenario??
Difficult to understand.
Regards,
Hi,
Table1:
Load * Inline [
Region, Customer
A, ABC
B, BDE
]
;
Outer Join
Table2:
Load * Inline [
Region ,Customer
*,ABC
B,*
]
;
Mapping Reg: LOAD Region,Customer Resident Table1 ;
Mapping Cus: LOAD Customer,Region Resident Table1 ;
SUMARY:
LOAD *, ApplyMap('Cus',Customer,Null()) AS Region1,
ApplyMap('Reg',Region, Null()) AS Customer1
Resident Table1
;
DROP Table Table1;