Can someone date a look at this SQL and recommend a cleaner way to go about this?
[BMDTOR is a date field in the file stored as CCYYMMDD]
SELECT (DAYS(CURRENT DATE)-DAYS(SUBSTR(BMDTOR,5,2)||'/'||SUBSTR(BMDTOR,7,2)||'/'||SUBSTR(BMDTOR,3,2)))/30 AGE,
SUBSTR(BMDTOR,5,2)||'/'||SUBSTR(BMDTOR,7,2)||'/'||SUBSTR(BMDTOR,3,2), (CURRENT DATE)
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!