Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SCAN and DO WHILE logic
Message
 
 
À
28/10/2008 20:11:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01357888
Message ID:
01357898
Vues:
23
For this sort of logic I prefer to use just one scan.

>Replace the SCAN/ENDSCAN with another DO WHILE
>
>SELECT WorkListXMLCursor
>GO TOP
>DO WHILE !EOF()
>      GroupHeading = GroupHeading
>      DO WHILE GroupHeading = m.GroupHeading
>            SKIP
>            REPLACE GroupHeading WITH ""
>      ENDDO
>      SKIP
>ENDDO
>
>
>>I'm trying to only keep the first unique value of the GroupHeading field, blanking all others like it until I get to a different value. The code below is kicking out of the DO WHILE because the value of GroupHeading is changed by the REPLACE. I understand why, but how can I get around it?.
>>
>>			SELECT WorkListXMLCursor
>>			SCAN
>>				m.GroupHeading = GroupHeading
>>				DO WHILE GroupHeading = m.GroupHeading
>>					SKIP
>>					REPLACE GroupHeading WITH ''
>>				ENDDO
>>			ENDSCAN
>>
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform