Topic: Calculated Field

In sqlite the calculated field works well, but not in MySql: ifnull(firstname,'')||' '||ifnull(lastname,''). How can I get it work in Mysql?

Re: Calculated Field

Hi Kees,
Try it as
concat(expression1,"literal2 ", expression3)  and so on.
I think that should work (but I dont use MySQL so can't check it).
Derek.

3 (edited by brian.zaballa 2021-03-02 13:46:04)

Re: Calculated Field

you can also try

CONCAT(COALESCE(firstname,''),' ',COALESCE(lastname,''))

But you can also use and retain function IFNULL instead of COALESCE as Derek's Code. It'll work just fine too.

brian

Re: Calculated Field

Thanks Derek and Brian. It works for me fine.