Solved

select from partition range?

Posted on 2004-09-21
4
3,573 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 23

Assisted Solution

by:seazodiac
seazodiac earned 50 total points
ID: 12111710
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
ID: 12111748
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
ID: 12112014
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
ID: 12117079
I guess the answer is no then..
0

Featured Post

Technology Partners: 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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

749 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