title: EXECUTE IMMEDIATE CREATE TABLE
body: <p>Can anyone help me with this error? I wanted to Execute Immediate a Create Table statement that concatenates a table name that will change everyday/month.</p>
  
  <p>This is my code...</p>
  
  <pre><code>DECLARE
      v_table_name   VARCHAR2(100);
      v_get_fromdate VARCHAR2(200);
  BEGIN
      v_table_name   := 'mpiat_after_bs_' || SUBSTR(TO_CHAR(SYSDATE, 'ddmonyy'), 3, 5) || '_t';
      v_get_fromdate := 'select GET_FROMDATE(to_date(''01/'|| SUBSTR(TO_CHAR(SYSDATE, 'mmddyy'), 1, 2
      ) ||'/2017 00:00:00'',''dd/mm/yyyy hh24:mi:ss''),''R'') from dual;';
      EXECUTE IMMEDIATE ''
  
      CREATE TABLE ' || v_table_name || ' AS
      SELECT column1 ,
          column2 ,
          column3 ,
          column4 ,
          column5
      FROM table_name
      WHERE column1 &gt;=' || v_get_fromdate ||'
      AND column3 LIKE ''tbl_%''';    
  END;
  </code></pre>
  
  <hr>
  
  <p>this is the error the I am getting...</p>
  
  <pre><code>Error report -
  ORA-00936: missing expression
  ORA-06512: at line 7
  00936. 00000 -  "missing expression"
  *Cause:    
  *Action:
  
  
  Line 7 is EXECUTE IMMEDIATE 'CREATE TABLE ' || v_table_name || '  AS    SELECT column1
  </code></pre>
  
  <p>I've searched a lot of code regarding this... but I haven't seen anyone concatenates table name as a variable while creating table.</p>
  
  <p>I just wanna know if this is possible. And i am open for any suggestion for this to work. Thank You!</p>