I need to know how to get the record count for a particular year. the date field is in YYYYMMDD format. I tried the query
select SUBSTR(PLGLDT,0,4) AS YEAR, COUNT(*) AS "RECORD COUNT" FROM BPCSF60/APL
GROUP BY SUBSTR(PLGLDT,0,4)
ORDER BY SUBSTR(PLGLDT,0,4) DESC.
But I am getting error "Argument 2 of substringing function not valid".
Can any one help me on this?
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!