SQL Language (MOSC)

MOSC Banner

need help with a query

edited May 4, 2011 11:49PM in SQL Language (MOSC) 2 commentsAnswered
hi,

I am working in oracle database 9i

I have two queries that I would like to have their results in union. to bring me the results in two different rows.

the first query is:

select * from
(
select 'MAR_11_POs', count(segment1) MAR
from po_headers_all
where to_date(CREATION_DATE) between to_date('01-MAR-11','DD-MON-YY') and to_date('31-MAR-11','DD-MON-YY') ),
(
select 'APR_11_POs', count(segment1) APR
from po_headers_all
where to_date(CREATION_DATE) between to_date('01-APR-11','DD-MON-YY') and to_date('30-APR-11','DD-MON-YY') ),
(
select 'Year_11_POs_MAR',count(segment1) TOTAL_TO_MAR

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center