Results 1 to 3 of 3

Thread: temporary record set

  1. #1
    Guest

    Post

    I'm trying to write a temporary table that I may use to sort data records that are collected in the procedure... Is there an efficient way to create the table in memory to manipulate the collected data (Sort,totals,etc...) and then delete the table after the data is written to a flat file...

    I may eventually use the data in a crsytal report.

    Thanks,

    Marc

  2. #2
    Lively Member
    Join Date
    Jun 1999
    Location
    Raleigh, NC
    Posts
    70

    Post

    When you say temp table, is it required that the table be temporary or just the data? If the table structure would be consistent, I would just create and save a table, then delete all records from it before using it. (This could be problematic with multi-users, however). Otherwise, you could programmatically create the table, append it to the tabledefs collection, manipulate your data and then remove it from tabledefs when you are complete.

    Hope this helps.

    Bash

  3. #3
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Bashfirst is on the right track, but you can create a table on the fly based on your SQL statement:

    Select * Into TempTableName From TableName


    This will create a table TempTableName and put everything from TableName into the new table.

    Then, after using that table you can drop it:

    Drop Table TempTableName


    Regards,

    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]



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