Cleaning Up Text Data Before Importing
Sometimes the data you want to import from a text file has a consistent quirk that is sure to cause problems. Most people work with fairly recent software versions, but in any organization you'll find isolated holdouts clinging to programs so antiquated that their software doesn't use standard delimiter characters (commas or tabs). Problems also occur with text files that contain extra return characters: The extra return produces a blank record, which can throw off the database import structure.If you have a text file that contains extra returns or other single-character anomalies, there is a relatively painless method for removing them in a word processing program like Microsoft Word, before you import the file. Be sure to work on a copy of your text file, not the original, so that you can recover the original if you make a mistake. Not all of these changes are easy to undo.
To delete formatting characters in Word
1 .Open the text file in Word.2 .Choose Tools > Options in Windows or Word > Preferences (Command+,) on the Macintosh.3 .When the Options or Preferences dialog box appears, the View tab/preference will be selected. Under "Nonprinting characters," click the check boxes next to "Tab characters" and "Paragraph marks" (Figure 14.1). (In Word 2000, the section you need in the View tab is called "Formatting marks.") Click OK.
Figure 14.1. To see the formatting in a Microsoft Word text file, use Tools > Options or Word > Preferences to make the nonprinting characters visible.

Figure 14.2. These extra return characters need to be stripped out of the file before you import it.
[View full size image]

Figure 14.3. Clicking the More arrow button opens the Search and Find/Replace advanced sections.

Figure 14.4. Formatting characters are available in the Special drop-down menu.

Figure 14.5. Replace All examines the entire document and replaces every double return with a single return.

