using EXECUTE IMMEDIATE to run DBMS_STATS.GATHER_SCHEMA_STATS

From: Kevin S <SearleK_at_googlemail.com>
Date: Fri, 31 Oct 2008 04:53:34 -0700 (PDT)
Message-ID: <c285fc93-2f58-4acb-b9e3-083caa86d366@w39g2000prb.googlegroups.com>


When I run the block below, in oracle 10.2.0.3.0, I get the error shown after. Is this a problem with my coding or is it just not possible to run this commad in pl/sql?

Thanks

DECLARE
    v_dbms_stats VARCHAR2(200):= 'EXEC DBMS_STATS.GATHER_SCHEMA_STATS( ownname => ''LOAD'', estimate_percent => 100, cascade => TRUE,options => ''GATHER AUTO'');';
BEGIN
   EXECUTE IMMEDIATE v_dbms_stats;
END; ERROR at line 1:
ORA-00900: invalid SQL statement
ORA-06512: at line 4 Received on Fri Oct 31 2008 - 06:53:34 CDT

Original text of this message