Does anybody know of a query I can use to find distinct values within a partition?
Printable View
Does anybody know of a query I can use to find distinct values within a partition?
Code:select distinct <column_name>
from <table_name> partition <partition_name>;
Am I missing something?
SQL> desc month_part;
Name Null? Type
----------------------------------------- -------- ----------------------------
A NUMBER
B NUMBER
C DATE
select partition_name from user_tab_partitions where table_name ='MONTH_PART'
APR10
MAY10
JUN10
SYS_P25
SYS_P21
SYS_P24
SYS_P22
SYS_P23
SQL> select distinct (c) from month_part partition SYS_P22;
select distinct (c) from month_part partition SYS_P22
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
Hi
select distinct (c) from month_part partition (SYS_P22)
thanks those F#&*!(& parentisis :)