Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a a table as follows:
No Transfer-from code Transfer-to code
TSHI047782 WRSS WRSH
TSHI047783 WRWH WRDI
etc.....
Basically I want to use the 'Transfer-from code" and then depending what the value in this field is, it should allocate it to a specific responsibility center.
So if the transfer-from code= WRSS,WRWH or WRDI
Then the responsibility center should be = WR
if the transfer-from code = MTWH or MTDI
Then the responsibility center should be = MT
The responsibility center is not available as a field in this table.
Hello!
Can you use Left() function for adding a new field?
Like
Load *,
Left(Transfer-from code,2) as responsibility_center
from data_table;
And if you have the responsibility_center field in another table it will be concatenated with new created.
Hello!
Can you use Left() function for adding a new field?
Like
Load *,
Left(Transfer-from code,2) as responsibility_center
from data_table;
And if you have the responsibility_center field in another table it will be concatenated with new created.
please go through with
and other string functions
May be like this
LOAD *,Pick(Match([Transfer-from code],'WRSS','WRWH','WRDI','MTWH','MTDI'),'WR','WR','WR','MT','MT') as [responsibility center] Inline [
No, Transfer-from code, Transfer-to code
TSHI047782, WRSS, WRSH
TSHI047783, WRWH, WRDI
TSHI047784, WRDI, WRDI
TSHI047785, MTWH, WRDI
TSHI047786, MTDI, WRDI
];
or this
LOAD * Inline [
Transfer-from code,responsibility center
WRSS,WR
WRWH,WR
WRDI,WR
MTWH,MT
MTDI,MT];
LOAD * Inline [
No, Transfer-from code, Transfer-to code
TSHI047782, WRSS, WRSH
TSHI047783, WRWH, WRDI
TSHI047784, WRDI, WRDI
TSHI047785, MTWH, WRDI
TSHI047786, MTDI, WRDI
];