Query/400 generates default values like when using JDFTVAL in an LF
or on OPNQRYF. An SQL query generates the NULL value.
To get the SQL to match the *QRYDFN, the selection in the SQL WHERE
clause, fields compared against literals or fields, must be changed to
use IFNULL(field, DEFAULT). I am sure the DEFAULT kwd is not accepted
there, so specify the default according to the default specification in
the field of the file. I suppose the same may be required for joined on
fields.? The SELECT list will have to use IFNULL(field, DEFAULT) for
presentation as well, if the NULL value should be replaced; VALUE() and
COALESCE() are available instead of IFNULL().
This thread ...
Re: Making Matched Records with Primary File in Query an Outer join in SQL, (continued)
This mailing list archive is Copyright 1997-2020 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