Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friend, I have a field Gender, Data is this field like this :
In this field is MALE, M, FEMALE, F like this
I want this in the format of Male and Female, So need syntax for the same.
Regards,
AK
Got it :
if(Gender = 'M' or Gender = 'Male','Male', If(Gender = 'F' or Gender = 'Female', 'Female','Unkown')) as Gender_Name
I think better and optimized way to do at backend using applymap
see below example.
A:
Mapping load * Inline[
gender, Gender
Male, Male
M,Male
Female,Female
F,Female
];
Temp:
load * Inline [
gender
Male,
M,
Female,
F
];
LOAD
ApplyMap('A',gender) as Gender
Resident Temp;
DROP Table Temp;