Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Archiving data in SQL Server
Message
From
21/07/2006 10:04:15
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Archiving data in SQL Server
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01138428
Message ID:
01138428
Views:
49
Hi,

I need to provide a way for archiving data from an SQL Server database. I want to split the data from one table into a separate table for each year based on a date field in the table and then delete it from the source table. (Is there also a log table that I need to delete or archive too?)

I want to let a user enter a date that they want to archive up to (that is all records with the date less than the entered date will be archived).

I can think of two options as to how to approach this:

1. Use my business object to get a cursor with all the records to be archived, then process them one at a time spitting them into the appropriate "year" table and then deleting them from the main table.

2. Use a stored procedure.

I don't know anything about stored procedures in SQL Server, but I have a feeling that a stored procedure should be faster than using my business objects.

Does anybody have any suggestions on what the best way is to approach this and maybe where I can find out more information?

Thanks.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Next
Reply
Map
View

Click here to load this message in the networking platform