Article ID: 114498
Article Last Modified on 3/3/2005
* Replaces the field for each record
REPLACE <fieldname> WITH RIGHT(TRIM(<fieldname>),1)+;
SUBSTR(<fieldname>,2,LEN(TRIM(<fieldname>))-2)+LEFT(<fieldname>,1) ;
FOR LEN(TRIM(<fieldname>))>1
Before the commands are executed, a sample table may look similar to the
following:
<FIELDNAME> ----------- A-0000-Z B-0-Y C-000000-X D-00000-WAfter the commands are executed, the table looks as follows:
<FIELDNAME> ----------- Z-0000-A Y-0-B X-000000-C W-00000-DThe REPLACE command concatenates the original rightmost character with the a substring of the original value, which omitts the first and last characters, and appends the original leftmost character to that string.
Additional query words: FoxMac FoxDos FoxWin VFoxWin 2.50 2.50a 2.50b 2.50c 2.60 change reverse alter
Keywords: kbinfo KB114498