Focal Point
HOW DO I REMOVE COMMAS FROM A STRING?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2261002351

February 08, 2006, 05:15 PM
k8iw
HOW 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


Mike Anderson
February 08, 2006, 05:18 PM
Tony A
quote:
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'));



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 08, 2006, 06:47 PM
Piipster
SHORT_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.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
February 09, 2006, 03:22 AM
Tony A
Well spotted Karen, that will teach me to try and answer problems when I've been awake for too long!



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 09, 2006, 11:15 AM
k8iw
I 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


Mike Anderson