× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Trevor Perry wrote:
All,

I am using a LEFT OUTER JOIN. [...]
The field I need from the ~right~ file is being filled with NULL when there
is no record there. I really would like blanks in that field rather than
NULL.

You can use CASE with IS NULL. For example:

with t1 as (select 1 as k1 from sysibm.sysdummy1
UNION
select 2 as k1 from sysibm.sysdummy1),
t2 as (select 1 as fk1,'A' as ref from sysibm.sysdummy1
UNION
select 1 as fk1,'B' as ref from sysibm.sysdummy1)

select k1, case when ref IS NULL then '' else ref end
from t1 left outer join t2
on k1 = fk1

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.