Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan endscan break
Message
 
À
17/12/2007 14:19:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01276291
Message ID:
01276323
Vues:
26
>>I another database language I use there is a powerful FOR loop...
>>
>
>lcoldstate               = "$$$"
>scan for customer.country='USA'
>    if  lcoldstate = customer.country
>    else
>        if  lcoldstate = "$$$"
>            * do something with first record
>        endif
>        *break by customer.state no-lock:
>    endif
>
>    * do something with records
>    lcoldstate           = customer.country
>endscan
>* do something with last record
>
>>
>>Scan endscan sort of does this but I cannot break. Can VFP do something like this?

Shouldn't this "lcoldstate = customer.country" be "lcoldstate = customer.state"?

The last record should be last the last record in the break group not the last record of the scan.

Plus this all depends on an index being set first which may not be the case but if I have to deal with it I will.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform