aarong
(Aaron Gulley)
1
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…
Banderson
(Brandon Anderson)
2
Have you tried empty string?
aarong
(Aaron Gulley)
4
This is with
ISNULL(TABLE.NAME, 'Default Address')
ckrusen
(Calvin Krusen)
5
(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