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

Thread: execute immediate

  1. #1
    Join Date
    Mar 2010
    Posts
    6

    execute immediate

    hello all,

    declare
    begin
    execute immediate ('create table temp as select * from emp where emp_name='ABC'
    ')
    ;
    end

    but it can't work.

    can anyone correct me


    regards,
    Ash

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Syntax error, try:
    execute immediate 'create table temp as select * from emp where emp_name=''ABC''';
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    May 2002
    Posts
    2,645
    Why are you even using declare if there is nothing to declare? Is this a homework problem?

  4. #4
    Join Date
    Mar 2010
    Posts
    6
    Thanks a lot PAVB for yr quick replay.

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