Should I use coalesce for all the select fields then? I tried using coalesce(fieldName,' ') on the two fields that appear in the query as "blank" values but I still have no "missing" records as I run the Query and the SQL side by side. I am guessing that it is due to my join logic or the where clause, but I haven't tripped over the "magic" combination yet.

Thanks,

Pete


CRPence wrote:
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

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-2019 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].