|
I am relatively new to the SQLRPGLE arena, and am having a problem with a date field. In this SQL statement: C/EXEC SQL C+ Declare C1 cursor for C+ select Line#, Control, Text from DETAIL C+ where Custno = :Scn_Custno C+ and SentDate = :Scn_Date C/END-EXEC My problem is that in a particular example, it isn't going to find any records in DETAIL. When I run this SQL statement interactively, it just returns a blank screen. When I run it in RPG, I get the following message (RNX0114): Message . . . . : The year portion of a Date or Timestamp value is not in the correct range. Cause . . . . . : A conversion was requested to a Date value, from a Timestamp or a Date value, and the year of the source Timestamp or Date is not in the allowable range of the target. -- The range for a 2-digit year is 1940-2039. -- The range for a 3-digit year is 1900-2899. -- The range for a 4-digit year is 0001-9999. I'm assuming this has something to do with returning null values, but I'm not sure how to fix it. Carmen
As an Amazon Associate we earn from qualifying purchases.
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.