question

SQL 1 avatar image
SQL 1 asked

Grouping FY in Oracle

Hi, is there a way in Oracle that can pull the FY? I used the script below to pull just two FY. Mytable date range is from FY1998 to FY2009. select 'FY2008' as FY, Site, count(*) from mytable where date >='10-OCT-2007' and date <'10-OCT-2008' group by site --------------------------------- select 'FY2009' as FY, Site, count(*) from mytable where date >='10-OCT-2008' and date <'10-OCT-2009' group by site --------------------------------- Pulling two FY is OK but it's too much repeatative when pulling more than 10 FY.
oracle
10 |1200 characters needed characters left characters exceeded

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

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.