Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace question
Message
De
16/09/1998 18:55:33
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00136915
Message ID:
00137560
Vues:
18
How about not doing

> lcATAFValue = STR(lnATAFValue)

But, instead, trying with

lcATAFValue = STR(lnATAFValue,5,0)

And then you may continue as usual with

> SELECT ATA_Report
> GO BOTTOM
> REPLACE (lcATAFName) WITH lcATAFValueTHIS ONE DOESN'T

The rest seems to be fine. It's just (from my guessing) that you're replacing a ten digit string into a five character field, and the left five characters of the string are blank. Try this:

create cursor tmp (c1 c(5), c2 c(5))

x=1
append blank
replace c1 with str(x)
replace c2 with str(x,5,0)

You should have a " 1" in c2, and blanks in c1.

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