Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have a field called Abnormal which has the data 'H','L',' '
Now i want to drive a field called Normality based on the condition
1.if Abnormal is 'H','L' then the data should be 'Abnormal'
2.if Abnormal is ' ' then the data should be 'Normal'
Expected output:
Normailty
Abnormal
Normal
I used this if(subfield(Abnormal,',')='','Normal','Abnormal' ) as Normality but i am getting some null values also in Normality field.
Regards,
Joshua.
Hi,
since you have null values in abnormal fields that way its not getting excluded from the condition that we are trying to imply..
if you want to replace the null values of Abnormal fileds with Nomal values try below.
if(len(subfield(Abnormal,','))=0 OR Abnormal='' , 'Normal','Abnormal' ) as NormalityF
Hi Sagar,
It doesn't works.
Dear bhasker,
still i am getting null values.
Dear Max,
It doesn't works.
Hi,
PFA, script and app
NoConcatenate
FINAL:
Load
*,
if(len(subfield(Abnormal,','))=0 OR Abnormal='' , 'Normal','Abnormal' ) as NormalityF
Resident patient;
Drop Table patient;