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
    guitarhero23 Contributor
    Answer ✓

    How about something like

     

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

    ELSE `settlementID`
    END
    )

     

     

    dojo help 3.JPG



    **Make sure to like any users posts that helped you and accept the ones who solved your issue.**

Answers

  • guitarhero23
    guitarhero23 Contributor
    Answer ✓

    How about something like

     

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

    ELSE `settlementID`
    END
    )

     

     

    dojo help 3.JPG



    **Make sure to like any users posts that helped you and accept the ones who solved your issue.**
  • thank you