2 Replies Latest reply: Dec 5, 2011 4:08 PM by 903418 RSS

    EXECUTE IMMEDIATE PROBLEM

    903418
      Here is a snippet of my PL/SQL

      SELECTSTATEMENT :=
      'ALTER TABLE CONVERSION.'
      || P_ORACLE_TABLE
      || ' ADD PARTITION '
      || P_PARTITION_NAME
      || ' VALUES LESS THAN(TO_DATE('''
      || P_LESS_THAN_DATE
      || ''',''MM/DD/YYYY'')) TABLESPACE TS_CIF_SOLUTION2';

      EXECUTE IMMEDIATE SELECTSTATEMENT;

      All this block of code is doing is trying to add a partition with a certian date.

      All variables are varchar2. The version of Oracle DB I am using is 11gR2. I am getting the following error

      ALTER TABLE CONVERSION.UNI_FILE ADD PARTITION UNI_CUSS_C1 VALUES LESS THAN(TO_DATE('12/03/2011','MM/DD/YYYY')) TABLESPACE TS_CIF_SOLUTION2
      ORA-00911: invalid character
      -911