PDA

Click to See Complete Forum and Search --> : temporary record set


Jul 20th, 1999, 06:40 PM
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

bashfirst
Jul 20th, 1999, 07:13 PM
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

Serge
Jul 20th, 1999, 09:33 PM
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
Serge_Dymkov@vertexinc.com
Access8484@aol.com