Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Isnull in SQL expression Post Reply Post New Topic
Author Message
$$Dr
Newbie
Newbie


Joined: 18 Feb 2016
Online Status: Offline
Posts: 16
Quote $$Dr Replybullet Topic: Isnull in SQL expression
    Posted: 02 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.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 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
IP IP Logged
$$Dr
Newbie
Newbie


Joined: 18 Feb 2016
Online Status: Offline
Posts: 16
Quote $$Dr Replybullet Posted: 02 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.)
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 May 2019 at 6:50am
it might be a custom function in that DB
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 02 May 2019 at 10:41am
looking online...ifnull is mysql's nullif as DBlank alluded to.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.008 seconds.