Results 1 to 3 of 3

Thread: Drop Temp Table

  1. #1
    Join Date
    Mar 2006
    Posts
    127

    Drop Temp Table

    Hi All,

    How do you drop a temporary table within a stored procedure?

    I have a command that looks like this but it doesn't seem to be working:


    sqlstmt := 'drop table env_description';
    execute immediate sqlstmt;


    Any help is appreciated.

    Thanks.

  2. #2
    Join Date
    Mar 2006
    Posts
    127
    Never mind. I figured it out. But now I am trying insert data into temp table and it's not working.

    sqlstmt := 'insert into env_description(env_desc) values ('(1) used black in color wallet')';
    execute immediate sqlstmt;


    Error:

    PLS-00103: Encountered the symbol "(" when expecting one of the
    * & = - + ; < / > at in is mod remainder not rem return
    returning <an exponent (**)> <> or != or ~= >= <= <> and or
    like LIKE2_ LIKE4_ LIKEC_ between into using || multiset bulk
    member SUBMULTISET_

    Any idea what is wrong with my statement?

    Thanks.

  3. #3
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You need to escape the ' character

    sqlstmt := 'insert into env_description(env_desc) values (''(1) used black in color wallet'')';
    execute immediate sqlstmt;

Posting Permissions

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