How can i delete a , space in VFP9

Hi
Wondering how I can delete a coma and space from a column if is in the beginning
eg

, 123          would be 123
456            would be 456

Thanks
RVLAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pcelbaCommented:
One space or one comma at the beginning
REPLACE column WITH SUBSTR(column, 2) FOR LEFT(column, 1) $ ' ,'

Many spaces at the beginning:
REPALCE column WITH LTRIM(column) FOR LEFT(column, 1) = ' '
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jrbbldrCommented:
Pavel's advice above will work well.

But if you should want a more general approach to eliminate ALL occurrences of the comma-space (, ) wherever they occur you could use something like:

REPLACE ALL column WITH STRTRAN(column, ", ", "")

Open in new window

NOTE - in case that is hard to read it is    double-quote  comma  space  close-double-quote   comma  double-quote  close-double-quote

Good Luck
0
pcelbaCommented:
Nice example how to destroy information value of your data :-)

123, 456, 789
12, 34, 56, 7, 8, 9

will both be converted to:

123456789
0
jrbbldrCommented:
Pavel - that would be very true if the data existed as you have shown,
123, 456, 789
12, 34, 56, 7, 8, 9
will both be converted to:
123456789

But I was commenting in regards to the example that the original poster showed where the data existed in a single individual column.
, 123          would be 123
456            would be 456

However I indicated that your original answer was a good one for their purposes.
I was merely allowing for other possibilities within their same over-all data pattern that they might want to consider.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FoxPro

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.