Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating Cursor with Replace Command
Message
De
21/09/2017 17:39:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Updating Cursor with Replace Command
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01654486
Message ID:
01654486
Vues:
81
Dear Sir,
I am using the following code to update a Row Position (POSR) in a Cursor
Select Distinct POSR From PAGETWO Order By POSR Desc Into Cursor DISTINCTPOSR
				nCD=12
					Scan
					nPagetwoDistinctposR=POSR
					Select PAGETWO
					nCOMMONDIFFERENCE=m.T-nCD
					Replace All POSR With nCOMMONDIFFERENCE For POSR=nPagetwoDistinctposR
					Select DISTINCTPOSR
					nCD=nCD+12
				ENDSCAN
Using the above code at first instance my POSR is changed by Desired value say from 696 to 453.

However, In the scan loop if the value of nPagetwoDistinctposR again comes to 453 by chance, it again updates my cursor to new value.

For the above I have a solution to insert another Like Yes/NO etc but I am seeking for some simple solution and Better Code or a SQL that may work faster For the above.

Pls Guide
Regards
Harsh
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform