Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace question
Message
From
16/09/1998 18:55:33
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00136915
Message ID:
00137560
Views:
17
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform