how to get report 4th quarter

Posted on 2011-10-24
Last Modified: 2012-06-27
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/ D 1 30
#00 06 * * 2-5   $HOME/ 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
Question by:ajaybelde
    LVL 73

    Accepted Solution

    00 08 * 10,11,12  0,1,6 $HOME/ D 1 30
    LVL 73

    Assisted Solution

    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
    LVL 73

    Assisted Solution

    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
    LVL 76

    Assisted Solution

    by:slightwv (䄆 Netminder)
    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.
    LVL 73

    Assisted Solution

    >>> 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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Article by: Swadhin
    From the Oracle SQL Reference ( we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
    This post first appeared at Oracleinaction  ( Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
    Via a live example, show how to take different types of Oracle backups using RMAN.
    This video shows how to recover a database from a user managed backup

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now