A period is the symbol for numeric missing values, no quotes.
In SQL it’s more conventional to use CASE statements instead of IFN. For one, if you or someone ever needs to migrate this to a different SQL implementation this makes it much easier.
@maliksmom2000 wrote:
I have two columns. One has a code for inspections, the second has the dates of the inspections. If the code is CM then I want it to return the date, if not I want it to be blank.
I don't know what to put in the "XXX" below so it returns a blank. I know it's not "" as it is a numeric expression and I know not to put a 0 or 1. I'm sorry I can't seem to get this one down.
ifn(t1.MSAI_STAT_CD="CM", t1.MSAI_STAT_DT, XXX)