July 14, 2020, 02:58 PM
Jveselka[SOLVED] TRIM/STRIP HELP
WF 8105m
Needs some code to TRIM leading characters before '-'. I only want the number after it?
ex.
HARRIS - 101
I will want the HARRIS in one column and 101 in the other.
Thanks
JV
This message has been edited. Last edited by: FP Mod Chuck, July 14, 2020, 05:39 PM
WazTry using TOKEN, check it out in the functions manual.
July 14, 2020, 07:01 PM
jltz83odWe have used a combination of POSIT and SUBSTRING for something like this.
DEFINE
SPECIAL_CHARACTER/I3 = POSIT(NAME,256,'-',1,'I3');
FIRST_NAME/A24 = SUBSTRING(NAME,1,SPECIAL_CHARACTER-1);
LAST_NAME/A24 = SUBSTRING(NAME,SPECIAL_CHARACTER+1,(LENV(NAME,'I3')-SPECIAL_CHARACTER));
END
July 15, 2020, 09:17 AM
JveselkaThanks jltz83od! That worked.