Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan endscan break
Message
 
To
17/12/2007 14:19:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01276291
Message ID:
01276323
Views:
27
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform