select 'some text, should be null:'|| NULL
This returns NULL and no other text. Why is that? I wasn't expecting the "some text.." to disappear altogether.
Is this a bug?
No. Null is "unknown" if you append unknown (null) to a piece of text, the result is unknown (null) too.
If you're using NULL to mean something other than unknown, you probably want to re-examine your reasons why.
I was able to work around the problem by using COALESCE (and casting variables since it wants the same data types passed to it).
That's the correct procedure (although ask yourself if you should have nulls rather than just empty strings).
-- Richard Huxton Archonet Ltd
---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings