× 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.



Nick,

Please be aware that in DB2 there not exists a "zero" date. The minimum
value would be, in your case "01/01/01".

Regards,

Luis Rodriguez



> ------------------------------
>
> message: 5 date: Thu, 18 May 2006 16:08:39 +0100 from: "Greenhough
> Nick DWP" <NICK.GREENHOUGH@xxxxxxxxxxxxxx> subject: Diagnostic
> CPD4019 message
>
> We have been having problems with a query continually failing with the
> CPD4019 message.
>
> It is a simple query where we want to select certain records which
> meet certain criteria from different tables and have a calculated date
> RESULT is less than or equal to zero. The CPD message refers to DATEA.
> These are the result fields we define:
>
> DATE1 - DIGITS(DATEA)
>
> DATE2 - SUBSTR(DATE1,7,2)||'/'||        SUBSTR(DATE1,5,2)||'/'||
> SUBSTR(DATE1,3,2)
>
> NEWDATE - DATE(DATE2)
>
> TODAY1 - DIGITS(TODAYS DATE)
>
> TODAY2 - SUBSTR(TODAY1,7,2)||'/'||         SUBSTR(TODAY1,5,2)||'/'||
> SUBSTR(TODAY1,3,2)
>
> NEWTODAY - DATE(TODAY2)
>
> RESULT - DAYS(NEWDATE) - DAYS(NEWTODAY)
>
> I have checked the database table and all entries in the column DATEA
> are valid dates in the format yyyymmddd (numeric) although some users
> have entered dates with the year as 3005 and 9200 (is there an upper
> system date beyond which it cannot calculate?)
>
> The query attempts to write certain fields away to another DB table
> but fails every time. I have replaced dates that did not correspond
> with the format yyyymmdd with a single date 18500101 (1st Jan 1850).
> The field can and does contain zero in some circumstances
>
> Can anyone help?
>
> Cheers
>
> Nick
>
> Nick Greenhough Configuration and Business Analyst Debt Manager
> Project Tel   0113 230 9239 (Lawnswood)
----------------------------
Luis Rodriguez
IBM Certified Systems Expert
eServer i5 iSeries Technical Solutions


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.