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

Thread: Temp Table

  1. #1
    Join Date
    Jun 2003
    Posts
    132

    Temp Table

    Hello,

    I have a query that creates about 30,000 records each time. I would like to dump the results into a temp_table with a timestamp. The query will run once a week and the results will be appended to the temp_table each time with a timestamp

    How would I go about creating this temp table?

    Thank you for your help

  2. #2
    Join Date
    Jun 2003
    Posts
    132
    Let me refrase.

    I would like the resuts to be dumped to a table, not a temp table.

    Thanks

    Roman

  3. #3
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    334
    Create the table the first time using:
    Code:
    create table table_b as select x,y,z from table_a;
    Then append to it using:
    Code:
    insert into table_b select x,y,z from table_a;

  4. #4
    Join Date
    Jun 2003
    Posts
    132
    I would like to insert result to a table from a query. This query looks up information from 3 different tables. So, idealy the results should be dumped into a summary table.

    Thanks

  5. #5
    Join Date
    Sep 2001
    Location
    Ohio
    Posts
    334
    Same principle. Just make your select join the three tables.

  6. #6
    Join Date
    Jun 2003
    Posts
    132
    I guess what I am after is a procedure that will insert results into the table.

    Thanks

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