Wouldn't it be beter to add (say) a BETWEEN condition on the variable on which the table is partitioned?
If you select on partition then if ever the partitioning was changed you'd get the wrong answer. It you insist on doing it that way, look at Dynamic SQL in the PL/SQL manual.




Reply With Quote