Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SCAN and DO WHILE logic
Message
De
29/10/2008 01:11:16
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
28/10/2008 19:56:28
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
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:
01357940
Vues:
14
>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
>
			SELECT WorkListXMLCursor
			SCAN
				m.GroupHeading = GroupHeading
				SKIP
				blank field GroupHeading WHILE GroupHeading = m.GroupHeading
			ENDSCAN
Didn't really try but should work. I imagine it would check the while condition before performing the operation. If it does not, then... tough. You may try to duplicate the column, so one goes to be blanked and shown, the other goes into the while condition.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform