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
Can objects of the same schema reside in different tablespace?
What is flashback in Oracle?
what is IDE,DMV in sql server?
Whether any commands are used for months calculation? If so, what are they?
How to assign a tablespace to a users in oracle?
How to sort the query output in oracle?
What's dateware house and what's clustor with practicle example
What is a package ? What are the advantages of package ?
What is a named program unit?
> CREATE OR REPLACE FUNCTION FACTORIAL_1(factstr varchar2 ) 2 RETURN NUMBER AS 3 new_str VARCHAR2(4000) := factstr||'*' ; 4 fact number := 1 ; 5 BEGIN 6 7 WHILE new_str IS NOT NULL 8 LOOP 9 fact := fact * TO_NUMBER(SUBSTR(new_str,1,INSTR(new_str,'*')-1)); 10 new_str := substr( new_str,INSTR(new_str,'*')+1); 11 END LOOP; 12 13 RETURN fact; 14 15 END; explanation Above program?
What is an oracle wallet?
Can a formula column be obtained through a select statement ?
How do I spool to a csv formatted file using sqlplus?
What to do if the startbd.bat failed to start the xe instance?
What are the attributes of the cursor?