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().

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.