November 14, 200520 yr I want to divide this text into two seperate fields. "Schofield Barracks/Schofield Barracks" I've got the first part broken out using: Left ( dept_loc; Position ( dept_loc; "/" ; 1 ; 1 ) -1) If I reverse that, for some reason it doesn't work. Here's what I've got: Right ( dept_loc; Position ( dept_loc; "/" ; 1 ; 1 )) Any help would be appreciated.
November 14, 200520 yr Hi the reverse of: Left ( dept_loc; Position ( dept_loc; "/" ; 1 ; 1 ) -1) is: Right ( dept_loc; Position ( dept_loc; "/" ; 1 ; 1 )-1) the "-1" is for deleting the "/" in the left and in the right functions !
November 14, 200520 yr Author Ok, fair enough. The result of: Call Center Hub - Col Springs/Colorado Springs Hub Using: Right ( dept_loc; Position ( dept_loc; "/" ; 1 ; 1 )-1) is: Springs/Colorado Springs Hub Ideas?
November 14, 200520 yr The Position() function counts from left. The Right() function counts from right. Try: Right ( dept_loc ; Length ( dept_loc ) - Position ( dept_loc; "/" ; 1 ; 1 ) )
November 15, 200520 yr Hi, of course my calc was right only if the left side and the right side have the same number of chars ! (as in your first example) So comment gives you the correct answer! BTW there is another way to calc the left side and the right side: leftSide: Replace ( text ; Position ( text ; "/" ; 1 ; 1 ) ; Length ( text ) ; "" ) rightSide: Replace ( text ; 1 ; Position ( text ; "/" ; 1 ; 1 ) ; "" )
November 15, 200520 yr Author OK, now I have another field. First and Last name seperated only by a comma and no space. I want to add a space there. (ie "Doe,John" becomes "Doe, John") Ideas? Thanks!
Create an account or sign in to comment