• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • 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

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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