Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Expert,
I know how apply map work. But I want to reverse it.
Branch_map:
Mapping
Load
NAME&’|’&DEPARTMENT,
BRANCH
from branch;
Table1:
Load
NAME,
DEPARTMENT,
BRANCH,
level,
.
.
.
applymap(‘Branch_map’, NAME&’|’&DEPARTMENT, null()) as NEW_BRANCH
FROM table1;
the above apply map checks mspping table with table and brings BRANCH from mapping table. But my requirement is reverse.
I mean, for the matched records, it should store BRANCH records from table.
give it a try with
....
IF (LEN(applymap(‘Branch_map’, NAME&’|’&DEPARTMENT, null())), BRANCH, applymap(‘Branch_map’, NAME&’|’&DEPARTMENT, null())) AS NEW_BRANCH
Peter