I have the following code in an RPG ILE program:

/EXEC SQL
+ DECLARE C1 CURSOR FOR
+ SELECT MIN(HIDATE)
+ FROM MHIST
/END-EXEC

FWIW, all my date fields are ISO (YYYY-MM-DD).

The program was blowing up when I tried to move the result to another date
field, saying I had an invalid date. I looked at the dump and the date
field contained "++++++++++".

I did STRSQL, ran the command, and got the same thing. I used Query and it
shows the minimum (oldest) date as "1915-01-05". Ran the SQL version again
but this time didn't ask for MIN. Instead asked to see the data and sorted
by date. All the dates prior to 1940-01-01 are "++++++++++".

I know I can sort the records by date, SETLL, and READ but I figured this
would be faster and more efficient.

Is there a "Yes, I really have data before 1940 that I'd like to see"
switch somewhere in SQL that I need to flip?

TIA.


James R. Newman

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.