question

artisltover avatar image
artisltover asked

The code below deletes rows utilizing ODUDAT but it does not delete rows when ODUDAT is empty

DELETE FROM HERAPERM.SCRUBLITST WHERE COALESCE(ODUDAT, ODCDAT,

CASE

WHEN ODUDAT <> ' ' THEN SUBSTR(ODUDAT, 1, 2) || SUBSTR(ODUDAT, 3, 2) || SUBSTR(ODUDAT, 5, 2)

ELSE SUBSTR(ODCDAT, 1, 2) || SUBSTR(ODCDAT, 3, 2) || SUBSTR(ODCDAT, 5, 2)

END) > TO_CHAR(CURRENT_DATE - 2 MONTHS, 'MMDDYY');

db2
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.