я должен удалить разделы, которые старше 364 дней.Разделы называются «log_20110101», поэтому теперь разделы, которые старше, чем сегодня, должны быть
CONCAT('log_',TO_CHAR(SYSDATE -364,'YYYYMMDD'))
, если я попробую такое утверждение, я получу ошибку
ALTER TABLE LOG
DROP PARTITION CONCAT('log_',TO_CHAR(SYSDATE -364,'YYYYMMDD'));
-
Error report:
SQL Error: ORA-14048: a partition maintenance operation may not be combined with other operations
14048. 00000 - "a partition maintenance operation may not be combined with other operations"
*Cause: ALTER TABLE or ALTER INDEX statement attempted to combine
a partition maintenance operation (e.g. MOVE PARTITION) with some
other operation (e.g. ADD PARTITION or PCTFREE which is illegal
*Action: Ensure that a partition maintenance operation is the sole
operation specified in ALTER TABLE or ALTER INDEX statement;
operations other than those dealing with partitions,
default attributes of partitioned tables/indices or
specifying that a table be renamed (ALTER TABLE RENAME) may be
combined at will