×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Buck,

Really there's no additional calculations than what we have now.

We don't really currently use
daysDiff = %diff(%date(): datefld: *days);

Instead we do
if datefld=*zeros;
daysdiff = -1;
else;
daysDiff = %diff(%date(): datefld: *days);
endif;

So, how is that different than
if %nullind(datefld);
daysdiff = -1;
else;
daysDiff = %diff(%date(): datefld: *days);
endif;

Null fields are easier on the users. Instead of
select avg(salesAmt) from salesfile where salesAmt<>0;
They can use
select avg(salesAmt) from salesfile;

CREATE TABLE QTEMP.BUCK (SALESAMT DEC ( 15, 5), SOMEDATA CHAR (5 ))
Table BUCK created in QTEMP.
INSERT INTO QTEMP.BUCK (SALESAMT, SOMEDATA) VALUES(5.6, 'yo')
1 rows inserted in BUCK in QTEMP.
INSERT INTO QTEMP.BUCK (SOMEDATA) VALUES( 'hiyo')
1 rows inserted in BUCK in QTEMP.
INSERT INTO QTEMP.BUCK (SALESAMT, SOMEDATA) VALUES(5.2, 'bye')
1 rows inserted in BUCK in QTEMP.
select avg(salesamt) from qtemp.buck
returns 5.4



Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.