Link to home
Start Free TrialLog in
Avatar of RVL
RVL

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jrbbldr
jrbbldr

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
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
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.