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

Thread: Insert into Temporary tables

  1. #1
    Join Date
    Feb 2002
    Posts
    3
    Hi guys
    I am creating a temporary table with one column and then inserting records into the temp table using a subquery.
    I am using ADO 2.7, the problem is it creates the temp table but when i do a insert, it is not inserting records into the temp table.
    If I do this from oracle GUI it works fine( i am using PL/SQL Developer from allround automations)
    The syntax is
    CREATE GLOBAL TEMPORARY TABLE SEC_FILTER_USERNAME(PROP_NO CHAR(10))
    INSERT INTO SEC_FILTER_GRAJPUT SELECT PROP_NO FROM CT_MAIN WHERE INST_CODE='BIGBUCKS'

    Any help is appreciated.

    Thanks

  2. #2
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    When you insert a record into a GTT, then the records are removed after the session ends. You may even delete the rows at the end of the transaction with "on commite delete rows;". In your case, probably ADO 2.7 creates a separate session and you are trying to view the records from another session.


  3. #3
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    GTT created without "on commit preserve rows" deletes all rows on commit.
    If ADO generated auto commit, inserting records would not have any effect.
    Try to find if ADO commits every single statement and turn this property off.

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