Solved

current quarter and four future quarters

Posted on 2007-11-30
1
1,595 Views
Last Modified: 2013-12-07
Hello Experts,

How to display current quarter and four future quarters using sysdate??

select 'Q'||to_char(sysdate,'Q')||'-'||to_char(sysdate,'YYYY') from dual;
Q4-2007
I want to generate the following:
Q4-2007
Q1-2008
Q2-2008
Q3-2008
Q4-2008
Thanks,
0
Comment
Question by:spsun
1 Comment
 
LVL 4

Accepted Solution

by:
radja7 earned 250 total points
ID: 20386296

SELECT 'Q'||to_char(dat,'Q')||'-'||to_char(dat,'YYYY') 
FROM (
  SELECT sysdate+(level-1)*91 as dat 
  FROM dual CONNECT BY level<=5
);

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
form builder not starting 3 72
Oracle - Query link database loop 8 55
Oracle DB Slows After Datapump Until Next Reboot 27 133
SQL query for highest sequence 4 64
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

730 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