case when field is blank write something else display value

Have a field settlementID, I'm wanting to display when there isn't a value for that row to show pending else show the settlement id

 

something like when settlementID is blank then 'Pending' else settlementID

 

 

thank you

Best Answer

  • guitarhero23
    Accepted Answer

    How about something like

     

    (CASE
    WHEN `settlementID` IS NULL THEN IFNULL(`settlementID`,'pending')

    ELSE `settlementID`
    END
    )

     

     

    dojo help 3.JPG

Answers