Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing partition name as a variable

633482Apr 15 2008 — edited Apr 15 2008
hi all
i'm trying to pass a variable as the partition name in my select query and getting the fallowing error.

SQL> DECLARE
2 PARTITION_NAME VARCHAR2(15) := 'PAR_JAN08';
3 BEGIN
4 SELECT * FROM TEST_T PARTITION('PARTITION_NAME');
5 END;
6 /
SELECT * FROM TEST_T PARTITION('PARTITION_NAME');
*
ERROR at line 4:
ORA-06550: line 4, column 50:
PL/SQL: ORA-00933: SQL command not properly ended
ORA-06550: line 4, column 1:
PL/SQL: SQL Statement ignored
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 13 2008
Added on Apr 15 2008
17 comments
7,839 views