February 08, 2006, 05:15 PM
k8iwHOW DO I REMOVE COMMAS FROM A STRING?
I need to remove commas from a text field using a TABLE in VM FOCUS 7.2.4. I found this routine on FOCAL POINT:
EDIT( (STRIP(15, FIELDA, ',', 'A15')))
But it only works for numerics. Here's the error I get:
DEFINE FILE EMPLFIL1
SHORT_COMPANY/A25 = EDIT(DESCR,'9999999999999999999999999');
RPT_COMPANY/A25 = EDIT( (STRIP(25, SHORT_COMPANY, ',', 'A25')));
ERROR AT OR NEAR LINE 113 IN PROCEDURE EMPLSENDFOCEXEC
(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF
FIELD: RPT_COMPANY
Any help will be greatly appreciated!
Mike
February 08, 2006, 05:18 PM
Tony Aquote:
RPT_COMPANY/A25 = EDIT( (STRIP(25, SHORT_COMPANY, ',', 'A25')));
Mike,
It looks as though you might have one too many brace pairs in your syntax -
RPT_COMPANY/A25 = EDIT(STRIP(25, SHORT_COMPANY, ',', 'A25'));
February 08, 2006, 06:47 PM
PiipsterSHORT_COMPANY is an alphanumeric field.
Why are you doing an EDIT on it to produce RPT_COMPANY?
An EDIT without a mask specified is used to convert alpha to integer or integer to alpha.
Take the EDIT out.
February 09, 2006, 03:22 AM
Tony AWell spotted Karen, that will teach me to try and answer problems when I've been awake for too long!
February 09, 2006, 11:15 AM
k8iwI would just like to thank all of you for your help. I took off the EDIT and the extra paren and voila! Focal Point is a great resource.
Mike