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!
No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.
Your password has been sent to:firstname.lastname@example.org
To follow this tag...
Thanks! We'll email you when relevant content is added and updated.
Share this item with your network: