Home » SQL & PL/SQL » SQL & PL/SQL » selecting the data from Partitioned table (oracle 10g)
selecting the data from Partitioned table [message #405747] Fri, 29 May 2009 05:25 Go to next message
parasuramchekuri
Messages: 32
Registered: March 2007
Location: vishakapatnam
Member
Hi,

I Create a Table with partitions...
I inserted data in that...

when i am try to get the data from that table use the normal select query...,

I didn't get any data,...

tell me how to retrive the data from partitioned tables...

Let me Know the solution


Thanks in Advance...
Ram
Re: selecting the data from Partitioned table [message #405750 is a reply to message #405747] Fri, 29 May 2009 05:43 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
We're going to need more details than that.

Partitioned tables are selected from just like normal tables - if your query doesn't return any data, then it means that you haven't inserted (and committed) any data into the table that matches the requirements of your query.

Re: selecting the data from Partitioned table [message #405752 is a reply to message #405750] Fri, 29 May 2009 05:50 Go to previous messageGo to next message
parasuramchekuri
Messages: 32
Registered: March 2007
Location: vishakapatnam
Member
hi
thanks for response

my actual problem is ,

i have to get the data from partitioned table based on partitions...

regards...
ram
Re: selecting the data from Partitioned table [message #405754 is a reply to message #405752] Fri, 29 May 2009 06:02 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Quote:
We're going to need more details than that.


Show us what you're doing.
Cut and paste from SQL*Plus to here.
Re: selecting the data from Partitioned table [message #405755 is a reply to message #405752] Fri, 29 May 2009 06:03 Go to previous messageGo to next message
elaiyavel
Messages: 114
Registered: April 2008
Senior Member
Try,

Select * from table_name(Partition_name)
Re: selecting the data from Partitioned table [message #405759 is a reply to message #405747] Fri, 29 May 2009 06:16 Go to previous messageGo to next message
parasuramchekuri
Messages: 32
Registered: March 2007
Location: vishakapatnam
Member
hi

actually my billing table has 1,00,000 records with 4 partitions names like P1,P2,P3,P4 with 25000 records each...

my requirement is i want to retrieve the data from Partition P1 only...

thanks...
ram
Re: selecting the data from Partitioned table [message #405760 is a reply to message #405759] Fri, 29 May 2009 06:23 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
How is the table partitioned?
Re: selecting the data from Partitioned table [message #405761 is a reply to message #405747] Fri, 29 May 2009 06:27 Go to previous messageGo to next message
parasuramchekuri
Messages: 32
Registered: March 2007
Location: vishakapatnam
Member
hi
range partition with bill date

Regards.
Ram
Re: selecting the data from Partitioned table [message #405762 is a reply to message #405755] Fri, 29 May 2009 06:29 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Quote:
Select * from table_name(Partition_name)


Have you actually tried this?

The actual syntax is
SELECT <column list>
FROM <table> PARTITION (<partition_name>)
WHERE...
Re: selecting the data from Partitioned table [message #405765 is a reply to message #405762] Fri, 29 May 2009 06:36 Go to previous messageGo to next message
parasuramchekuri
Messages: 32
Registered: March 2007
Location: vishakapatnam
Member
Thanks JRowbottom

Ya Its worked...
and please send the Full syntax
that is if i have Sub Partition for that table....

Thanks
Ram
Re: selecting the data from Partitioned table [message #405767 is a reply to message #405765] Fri, 29 May 2009 06:37 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read the documentation instead of asking to read it for you and copy it here.
You have been provided a link to it.

Regards
Michel
Previous Topic: when no_data_found
Next Topic: how to call ALTER from procedure
Goto Forum:
  


Current Time: Wed Dec 07 20:39:36 CST 2016

Total time taken to generate the page: 0.10997 seconds