The information in this article applies to:
- Microsoft Visual FoxPro for Windows, version 3.0
- Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6x
- Microsoft FoxPro for Windows, versions 2.5x, 2.6x
- Microsoft FoxPro for Macintosh, version 2.5x, 2.6a
SUMMARY
When you are importing an ASCII text file that has delimiters other than a
comma or a tab, specify the delimiter in the APPEND FROM command.
MORE INFORMATION
Example (using FoxPro 2.x Sample Tables)
- Create an ASCII text file by typing the following command in the Command
window:
MODIFY COMMAND test.txt
- In the TEST.TXT window, type in the following:
|4444|,|44444|,|12/01/93|,|444.44|,|444|
|5555|,|55555|,|12/02/93|,|555.55|,|555|
|6666||666666||12/03/93||666.66||666|
|7777||777777||12/04/93||777.77||777|
8888,|44444|,19931217,444.44,|444|
9999,|55555|,19931215,555.55,|555|
4545,45454,|12/01/93|,444.45,454
5656,56565,19931202,565.65,565
Notes
-----
- To create the pipe character ("|"), press SHIFT+BACKSLASH (\).
- In this example, the pipe character is used as a field delimiter and
the comma is used as a field separator. Using DELIMITED WITH TAB
yields tab field delimiters and DELIMITED WITH BLANK yields space
field delimiters. The field delimiter characters are used only to
surround the field data, and the field separator characters will
remain commas.
- Save the file.
- From the File menu, choose Open. Under List Files Of Type, select
Table/DBF, and then select INVOICES.DBF from the TUTORIAL subdirectory.
- In the Command window, type the following:
APPEND FROM TEST.TXT TYPE DELIMITED WITH |
Eight records should be added to the database.
|