|
Thanks Matt! That worked!
-----Original Message-----
date: Thu, 12 Aug 2004 10:29:57 -0600
from: "Tyler, Matt" <mattt@xxxxxxxxxxxxxx>
subject: RE: SQL date problem
You need this at least to prevent your error...
C/EXEC SQL
C+ SET OPTION DATFMT = *USA
C/END-EXEC
I cannot explain why, factually.
Thank you,
Matt Tyler
WinCo Foods, Inc
mattt@xxxxxxxxxxxxxx
-----Original Message-----
From: Carmen Nuland [mailto:cnuland@xxxxxxxxxxxxxx]
Sent: Thursday, August 12, 2004 10:23 a
To: rpg400-l@xxxxxxxxxxxx
Subject: SQL date problem
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
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.