I need to get the values of the previous quarter.how to do
this?eg: if my cuurent month is may i need to get the datas
of the month jan,feb,march.Can it be done in oracle.I tried
with date function q but for the month jan its not
retriving the previous quarter(oct-dec).how to solve
this.plpz anyone help me?

Answer Posted / jas

yes its possible...u can use the date functions
select * from table_name where col_name
between add_months (trunc(sysdate,'MONTH')-3)
and trunc(sysdate,'MONTH')-1

try usgin this might help..

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between post-database commit and post-form commit?

787


types of indexes and the rationale behind choosing a particular index for a situation.

2234


In which language oracle has been developed?

842


What is an Oracle index?

1387


What is rowid and rownum in oracle?

769


Is postgres faster than oracle?

785


How to execute a stored program unit?

793


In AP we done Customizations for Late Payments Charges. For Reporting Purpose What are the Documents Prepared for Customer Understanding??

1413


what is insert all statement in sql

5932


How can I get column names from a table in oracle?

758


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

2701


what's query optimization and without use of IN AND Exist can we get another way data from query

1892


Give the advantages and disadvantages of clusters.

781


How to create an oracle database manually?

794


Where are the settings stored for each instance in oracle?

883