Board index » delphi » data dump

data dump

Hello everyone.

I know this really does not have much to do with Delphi, although it
would help me with it in a way, but does anybody know it MS SQL 6.5 has
facilities to dump data from it databases based on a given date range.

i.e.  I want to dump everything from 2 weeks ago from all tables within
our development database.

I believe that each data record entry must have a date associated with
it on a system level. Maybe its an sp_ value.

Any help would be gratefully received.

and qualifies for 2 tickets to the world cup!!!!..   no.just kidding.

Thanks a lot.

Chris

Christopher Hampton-Pidgeon
Analyst\Programmer
www.aga-rayburn.co.uk
E-Mail : champ...@aga-rayburn.co.uk

 

Re:data dump


This is fairly easy to do if you have a timestamp column in each of your
tables.  Create a view with the appropriate criteria and then use bcp to
dump the view to a text file.
Without a timestamp or your own last modified date column you would have to
examine the transaction log (assuming you're not dumping it automatically)
for all records that were modified in the desired time period (this is not a
simple thing)

Quote
Hampton-Pidgeon, Christopher wrote in message

<7B4AFCA19AFED01193DC00805F058DA406B...@INFOTECH2.aga-rayburn.co.uk>...
Quote
>Hello everyone.

>I know this really does not have much to do with Delphi, although it
>would help me with it in a way, but does anybody know it MS SQL 6.5 has
>facilities to dump data from it databases based on a given date range.

>i.e.  I want to dump everything from 2 weeks ago from all tables within
>our development database.

>I believe that each data record entry must have a date associated with
>it on a system level. Maybe its an sp_ value.

>Any help would be gratefully received.

>and qualifies for 2 tickets to the world cup!!!!..   no.just kidding.

>Thanks a lot.

>Chris

>Christopher Hampton-Pidgeon
>Analyst\Programmer
>www.aga-rayburn.co.uk
>E-Mail : champ...@aga-rayburn.co.uk

Other Threads