cancel
Showing results for 
Search instead for 
Did you mean: 

when can we get null values in web i report object ?

former_member211289
Participant
0 Kudos

Hi All,

When I ran a query to generate the report ,report would be generated with null values in one column .

when can we get null values in web i report object ?

Are getting null values is because of any defect ?

Kindly let me know.

Thanks

Ram

View Entire Topic
Former Member
0 Kudos

You can get nulls in a variety of ways.

1/ The column itself contains NULL

2/ There is a case expression that evaluates to NULL for a given row

3/ There is an outer join that does not have values on "both sides" of the join, which would return NULL for the dataless side.

Those are the three most obvious things that I can think of.

former_member211289
Participant
0 Kudos

Mark,

Kindly elaborate the 2nd one, "2/ There is a case expression that evaluates to NULL for a given row"

Former Member
0 Kudos

If you don't have an ELSE at the end or you have a THEN NULL or ELSE NULL then you can get a null returned:

CASE WHEN table.country = 'United Kingdom' THEN 'UK' WHEN 'India' THEN 'IN' WHEN 'Hong Kong' THEN NULL ELSE 'Other' END

This will return null if table.country='Hong Kong'