Solved

select from partition range?

Posted on 2004-09-21
4
3,530 Views
Last Modified: 2012-05-05
Is it possible to select from a partition range?

ie.

something like

select * from table partition range (partition1,partition3);

0
Comment
Question by:morphman
4 Comments
 
LVL 23

Assisted Solution

by:seazodiac
seazodiac earned 50 total points
Comment Utility
well, if you have a LOCAL index (as opposed to global),

you can achieve the same goal
by specifying the where clause :

for example: partition1 has the partition key from 1-50.
partition3 from 100-150.

you can do sth like this:

select * from <table_name>
where partition_key between 1 and 50
UNION
select * from <table_name>
where partition_key between 100 and 150.
0
 
LVL 9

Accepted Solution

by:
pratikroy earned 75 total points
Comment Utility
Not that I know of.

But you can certainly create a view that has the data from the range of partitions that you are interested in and select from the view.

e.g.,

create or replace view emp3 as
select * from emp partition (p1)
union all
select * from emp partition (p2)
union all
select * from emp partition (p3);

Hope that would help
0
 
LVL 11

Expert Comment

by:sujit_kumar
Comment Utility
select p_no, empno from (
select 1 p_no, empno from emp partition (p1)
union all
select 2 p_no, empno  from emp partition (p2)
union all
select 3 p_no, empno  from emp partition (p3))
where p_no betwee 1 and 2;

0
 
LVL 6

Author Comment

by:morphman
Comment Utility
I guess the answer is no then..
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

772 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

12 Experts available now in Live!

Get 1:1 Help Now