Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Havy SQL
My Sql is
SELECT 'x3y2q1__q1',
partition_name
FROM all_tab_partitions
where (SYSDATE - TO_DATE(SUBSTR(partition_name,-8,8),'YYYYMMDD')) >
186
and UPPER(partition_name) not like '%CUR' AND UPPER(table_name) = UPPER('A1_MSC_TERMINATION_D') AND UPPER(table_owner) = UPPER('bus') ;
If I run it I got
[1]: (Error): ORA-01841: (full) year must be between -4713 and +9999,
and not be 0
Because it executes the
where (SYSDATE - TO_DATE(SUBSTR(partition_name,-8,8),'YYYYMMDD')) > 186
before the
and UPPER(partition_name) not like '%CUR'
Any Ideas
thx in advanced Received on Thu Apr 20 2006 - 03:08:41 CDT
![]() |
![]() |