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