Isnull in SQL expression
Printed From: Crystal Reports Book — Forum Name: Technical Questions
Posted By: $$Dr — 2 May 2019 at 5:50am
What does this statement mean when included in a record selection statement?
{fn IFNULL(POHD.Job,'')}
the data field could be different in similar expressions.
Posted By: DBlank — 2 May 2019 at 6:16am
not sure what your datasource is but the IFNULL should,I think, be basically the same as SQL's ISNULL()
which returns a default value for a null field
so if your table is
LETTER AGE
A 1
B NULL
C 4
and you select ISNULL(table.age,0) it returns 1 for row A, 0 (instead of null) for row B and 4 for row C Edited by DBlank - 02 May 2019 at 6:18am
Posted By: $$Dr — 2 May 2019 at 6:31am
Thanks, this statement was preventing a report from returning results in one database company vs another with results being displayed in old company but not new. (recent merge of 4 companies into a single company.)
Posted By: DBlank — 2 May 2019 at 6:50am
it might be a custom function in that DB
Posted By: lockwelle — 2 May 2019 at 10:41am
looking online...ifnull is mysql's nullif as DBlank alluded to.
|