Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field called department which holds multiple information. I need to extract Organization. info from the department data populated for each row.
Example:
Dep.ID Department
1 ABC - Helpdesk
2 XYZ - HR
3 NULL
4 IT
5 ABC - Network
Now I want to create an Organization field during my loading process to extract only ABC, XYZ values. If its null or does not contain a - I don't want to extract info for that row.
Regards,
H
Just to simplify use subfield(Department,'-',1) as field while loading your script
temp: LOAD * INLINE [
DepID, Department
1, ABC - Helpdesk
2, XYZ - HR
3, NULL
4, IT
5, ABC - Network
];
Final:
noconcatenate
Load DepID,
If(Index(Department,'-')>0,Left(Department,Index(Department,'-')-1),'') AS Department_Final
RESIDENT temp;
Drop Table temp;
Just to simplify use subfield(Department,'-',1) as field while loading your script