Microsoft KB Archive/110370: Difference between revisions
(importing KB archive) |
m (Text replacement - ">" to ">") |
||
(One intermediate revision by the same user not shown) | |||
Line 17: | Line 17: | ||
For example, when you use the following REPLACE command | For example, when you use the following REPLACE command | ||
<pre> REPLACE | <pre> REPLACE <field1> WITH <field1> + <field2> | ||
</pre> | </pre> | ||
and then browse the database after entering the above command, you will see no change in the data, although FoxPro indicated it made a number of replacements. | and then browse the database after entering the above command, you will see no change in the data, although FoxPro indicated it made a number of replacements. | ||
Line 28: | Line 28: | ||
To achieve the desired results, trim field1 and field2. For example: | To achieve the desired results, trim field1 and field2. For example: | ||
<pre> REPLACE | <pre> REPLACE <field1> WITH ALLTRIM(<field1>) + ALLTRIM(<field2>) | ||
</pre> | </pre> | ||
Additional reference words: FoxMac FoxDos FoxWin 1.02 2.00 2.50 2.50a 2.50b replacing does not KBCategory: kbprg kbprb KBSubcategory: FxprgBrowse | Additional reference words: FoxMac FoxDos FoxWin 1.02 2.00 2.50 2.50a 2.50b replacing does not KBCategory: kbprg kbprb KBSubcategory: FxprgBrowse |
Latest revision as of 17:46, 20 July 2020
PRB: Using REPLACE to Concatenate Two Fields Doesn't WorkID: Q110370 The information in this article applies to:
SYMPTOMSWhen you are attempting to concatenate two fields together in one field, the REPLACE command does not work correctly. For example, when you use the following REPLACE command REPLACE <field1> WITH <field1> + <field2> and then browse the database after entering the above command, you will see no change in the data, although FoxPro indicated it made a number of replacements. CAUSEThe field you are replacing is not large enough to accommodate the two fields including spaces. RESOLUTIONTo achieve the desired results, trim field1 and field2. For example: REPLACE <field1> WITH ALLTRIM(<field1>) + ALLTRIM(<field2>) Additional reference words: FoxMac FoxDos FoxWin 1.02 2.00 2.50 2.50a 2.50b replacing does not KBCategory: kbprg kbprb KBSubcategory: FxprgBrowse |
Last Reviewed: June 27, 1995 |