Hi,
I've a table in a sql 6.5 db that I need to periodically erase.
Before the erase phase I need to save the rows that I'll delete. I've tried to create a script that 'save' this rows' info in a file (in order to import that info if needed).
The script should generate a txt file that contain that info in this format:
insert in 'tablename' ('col1', 'col2', ....'colN') values('values1','values2', ...'valuesN');
insert in 'tablename' ('col1', 'col2', ....'colN') values('values1','values2', ...'valuesN');
........
(one row for every row that I'll delete)
With this file I just can run the sql statement and 'restore' the deleted rows .
I just don't know if this kind of solution is the best solution in this environment;
I've tried to do this by using sql's backup/restore tool but it doesn't work properly (I get duplicated rows or missings rows...)
Do you have any suggestion to give me...my experience is oracle oriented and I'm not so expert with ms sql...
Thanks for you support.
Ciao Roberto
I've a table in a sql 6.5 db that I need to periodically erase.
Before the erase phase I need to save the rows that I'll delete. I've tried to create a script that 'save' this rows' info in a file (in order to import that info if needed).
The script should generate a txt file that contain that info in this format:
insert in 'tablename' ('col1', 'col2', ....'colN') values('values1','values2', ...'valuesN');
insert in 'tablename' ('col1', 'col2', ....'colN') values('values1','values2', ...'valuesN');
........
(one row for every row that I'll delete)
With this file I just can run the sql statement and 'restore' the deleted rows .
I just don't know if this kind of solution is the best solution in this environment;
I've tried to do this by using sql's backup/restore tool but it doesn't work properly (I get duplicated rows or missings rows...)
Do you have any suggestion to give me...my experience is oracle oriented and I'm not so expert with ms sql...
Thanks for you support.
Ciao Roberto