Calculation Field Issues

Hey all,

I’m not sure why my syntax isn’t working as it’s correct… I am missing something?

(case when (OrderHed.ShipToNum) is null then 'Default Address' else OrderHed.ShipToNum end)

COALESCE(OrderHed.ShipToNum, 'Default Address')

Any ideas?

Both return nothing apart from the ShipToNum if there is one…

Have you tried empty string?

How do you mean?

This is with

ISNULL(TABLE.NAME, 'Default Address')

:confused:

(case 
  when (OrderHed.ShipToNum) is null then 
    'Default Address' 
  when OrderHed.ShipToNum == '' then 
    'Default Address' 
  else 
    OrderHed.ShipToNum 
end)

edit

And I’m pretty sure that OrderHed.ShipToNum will never be null. It may be the empty string ("") as @Banderson mentioned.

1 Like