Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • Last Modified:

how to get report 4th quarter

i was asked to get the technical user report for the fourth quarter for the sox databases we have.

we have a script already in place for sox audit report.

but i my question is hw can i get for 4th quarter

the cron entries are like this
00 08 * * 0,1,6 $HOME/sox_audit_report.sh D 1 30
#00 06 * * 2-5   $HOME/sox_audit_report.sh D 1 30

do i have to change some thing in the cron tab or in the script to get 4th quarter report

the script is a generic script.

please help me out
It ia urgent

thank you inadvance
  • 4
5 Solutions
00 08 * 10,11,12  0,1,6 $HOME/sox_audit_report.sh D 1 30
the 4th parameter in the crontab is the month list,  so to run in the 4th quarter you want 10,11,12

if you need to modify your script to "do something" special for the 4th quarter, I'd have to see the sql
probably you will need to have your query do something like

WHERE your_date_column >= add_Months(trunc(sysdate,'yyyy'),9)    -- date >= October 1 of current year
and your_date_column < add_months(trunc(sysdate,'yyyy'),12)     -- date < January 1 of next year
slightwv (䄆 Netminder) Commented:
If going by a date column in Oracle, I would go with:

WHERE to_char(your_date_column,'Q') = 4

 that won't use an index if one exists on the date column.
>>> Note:
>>>  that won't use an index if one exists on the date column.

yep, that's why I didn't suggest it  :)

you could create a function based index to support the to_char, but it's more efficient  not to.

coincidentally I "just" submitted an article discussing that today


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now