Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't do a simple REPLACE command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Can't do a simple REPLACE command
Divers
Thread ID:
00305973
Message ID:
00305973
Vues:
40
I am using the following piece of code:

************************
SELECT 1
GO TOP
DO WHILE .NOT. EOF()
cDupeId=EVALUATE(SYS(14,1)) && Get the Value of index tag number 1
SKIP
IF cDupeId=EVALUATE(SYS(14,1))
REPLACE samplenum WITH STR(VAL(samplenum)+1)
*BROWSE
ENDIF
ENDDO
*************************

The "samplenum" field is character type. However, when a duplicate on the index is found, it just blanks out the field. It doesn't replace it with the incremented value as I want it to.

For the most part the index tag #1 is made of up of a date+tank+apparatus+samplenum. And the data always starts with the samplenum equal to 1 in every case. When the complete index tag number 1 evaluates to a duplicate, I want it to increment the samplenum by one so it will no longer be a duplicate.

Thanks
Elgin Rogers Jr
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform