Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I need to create a new field (Distributor) based on two existing fields ( Disti_Name , Disti_Corp_ID) with the condition shown in table below.
Is there any way to do this other than hard code?
Disti_Name | Disti_Corp_ID | Distributor |
A_B | A B | AB |
A_C | A C | AC |
A_D | A D | AD |
thanks!
Hi Alice,
You could do it in two ways:
1: create during the table load statement a concatenation of the two fields, something like
x:
load * Inline
[
Disti_Name,Disti_Corp_ID,Distributor
A_B,A B,AB
A_C,A C,AC
A_D,A D,AD
];
NoConcatenate
Data:
Load
Disti_Name,
Disti_Corp_ID,
Distributor,
Disti_Name & '|' & Disti_Corp_ID as Key_LoadStatement
Resident x;
drop table x;
Or create a table with the expression:
"=Disti_Name & Disti_Corp_ID"
Attached is a QVW with both options.
Regards,
Felipe. !
Thanks Felip. Will test on this and update here.