Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a light version of a database
Message
 
 
À
07/07/2004 17:37:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00921520
Message ID:
00921654
Vues:
13
>>Here are my thoughts:
>>
>>1. Run GenDBC to make an empty copy of a database.
>
>I would not use GenDBC to do this, but this is a possibility.
>
>Personally, I keep an empty copy of the database handy, and make all structural changes there. That makes it simple to then update the changes (APPEND FROM for each table), a) in a directory I use for testing, b) at the client site (or shared folder in a network).
>

I do not think, we have an empty copy of this database, but I'm not certain.

But I've just thought of the simpler approach: Copy the whole database to the local disk, run necessary selects, zap tables, that need to be zapped and append from cursors.

The only problem now is in select statement. Would TOP 2 work?

BTW, I think, I missed that thread. Can you give a link?


>>2. I need a select statement to select two most recently run jobs per each job type, I'm not sure, how to write this select. I do not remember, if the Jobs table has a timestamp, but I want to have recent jobs per each type. Some jobs could be run year ago (for some job type), but I still want them, since I want to have every possible Job Type.
>
>I am not so sure whether this can be done with "standard" SQL... I think this has been discussed a few days ago. For a single record in each group, it should be simpler: max(...) and GROUP BY. But it should be fairly simple to write a UDF that uses structural programming to select the PKs of the last two records in each group.
>
>>3. Once I have JobIDs with these jobs, I can create selects for all related tables and then append from the resulting cursors...
>
>Yes, I think that would be the procedure to follow.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform