Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to structure a SQL Select command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01180237
Message ID:
01180249
Vues:
17
>I have a situation where a record represents a piece of art being created. It can go through various phases (request, initial completion, client approval, etc.) and may repeat some. So there is a child table that holds the task/phase, when it was assigned, and who assigned it. There is an index on the date/time field set up as descending so that the latest task/phase is always at the top. I need to select records whose current task/phase is a certain task/phase. It's easy enough to select records with this task/phase, but is there syntax that will let me select records where a particular task/phase is the most recent task/phase for that record? I can do this with a SQL statement and some iterative programming, but I was wondering about getting it done in one SQL statement.
>
>Russell Campbell

Your task will be much better accomplished if you keep 'Activetask' field (logical) in the child table, providing that you have only one record in child group with Activetask=.T. (you may have a candidate tag on parentid for activeflag=.t.).
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform