DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: execute immediate in Oracle7.3.4

  1. #1
    Join Date
    Jun 2000
    Location
    dumfries,va,usa
    Posts
    227
    Hi ,

    Is there a command that I can used to execute a dynamic sql in oracle 7.3.4 similar to the execute immediate command in 8.0 and above?

    Thanks,
    leonard905
    leonard905@yahoo.com

  2. #2
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    You have to use the DBMS_SQL package to dynamic SQL in Oracle 7.
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

  3. #3
    Join Date
    Jun 2000
    Location
    dumfries,va,usa
    Posts
    227
    Could you please give me an example to execute this statement

    'CREATE TABLE temp (t_controlfile varchar2(30),
    t_date date)';

    Thanks a lot!!
    leonard905
    leonard905@yahoo.com

  4. #4
    Join Date
    Dec 2001
    Location
    Brazil
    Posts
    282

    Using DBMS_SQL ?
    you must have access to this package first.


    DECLARE
    v_cursor INTEGER;
    v_string VARCHAR2(100);
    BEGIN
    v_cursor := DBMS_SQL.OPEN_CURSOR;
    v_string := 'CREATE TABLE temp (t_controlfile varchar2(30), t_date date)';
    DBMS_SQL.PARSE(v_cursor, v_string, DBMS_SQL.NATIVE);
    DBMS_SQL.CLOSE_CURSOR(v_cursor);
    END;



    F.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width