MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » May 2014

can this reject bad data?



fixed

There is some bad data in our system. there is a lack of

validate checking. in this case, can this sql reject for processing

any such bad dates? bad dates are defined as month > 12 and days accordinlgy



SELECT
ALL T01.UAUSRN,
SUBSTR(DIGITS(UAFLWD),5,2) CONCAT '/' CONCAT
SUBSTR(DIGITS(UAFLWD)
,7,2) CONCAT '/' CONCAT SUBSTR(DIGITS(UAFLWD),3,2) AS
FOLLOWUP,
(T01.UAENT#), T01.UASFX#, T02.ADENTN, T01.UANOTT,
T01.UANOTL, T02.ADLNM, T02.ADFNM,
T01.UAFLWD
FROM ASTDTA.NOTEHDUA T01 INNER JOIN
ASTDTA.ADRESsad T02
ON UAENT# = ADENT#
AND UASFX# = ADSFX#
WHERE UAFLWD BETWEEN 20000101 AND 20991231
AND UAPRGD < 1
AND UANOTT = 'E'
ORDER BY 001 ASC, 008 ASC





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact