That's a good question. I'm not sure there is a way to do that easily in a single SQL statement. (I'm posting this partly to get e-mail notification from other postings here, in case someone else knows of a way.)
One possibility would be to write a PL\SQL procedure that starts with a query from user_tab_partitions (or: all_tab_partitions) to get the partition names, then a second query from each partition in turn, but that would require the use of dynamic SQL (execute immediate). Plus, getting the results from that back to a single select statement would be a challenge.
Main Topics
Browse All Topics





by: paquicubaPosted on 2005-09-22 at 09:29:14ID: 14938106
Can you provide more details...
* Table structure
* Sample data
First you use <purchase_date>, then <partition_name> <<--- What are trying to group here