|
See the WHENEVER logic below:
Sample data (as stored into a simple character field):
SAMPLE
2007-02-10
2007-02-32
2007-02-15
D testdate s d
/free
exec sql
Set Option
Naming = *Sys,
Commit = *None,
UsrPrf = *User,
DynUsrPrf = *User,
Datfmt = *iso,
CloSqlCsr = *EndMod;
*inlr=*on;
exec sql
declare c1 cursor for
select CAST(SUBSTRING(BIGTEXT,1,10) AS DATE) AS THEDATE
from blastme;
exec sql
open c1;
exec sql
whenever sqlerror continue;
dow 1=1;
exec sql
fetch c1 into :testdate;
select;
when sqlstt='02000';
leave;
when sqlstt<>'00000';
dsply sqlstt;
iter;
EndSl;
dsply testdate;
EndDo;
exec sql
close c1;
/end-free
Joblog:
call aaasql
DSPLY 2007-02-10 Data mapping error on member BLASTME. Data mapping error on member BLASTME. Data mapping error on member BLASTME. Syntax of date, time, or timestamp value not valid. DSPLY 22007 DSPLY 2007-02-15 Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.