Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delimited text file import: What's wrong with it?

Status
Not open for further replies.

jlockley

Technical User
Nov 28, 2001
1,522
US
I have a list of about 2,000 names I want to import. The list is kindly arranged in the following manner:

Ms Jane Doe (Or Mr John Doe)

Phone: 555 555 5555

Office Phone: 555 555 5556

Company: Jane's Little Shop of Horrors

etc.., so that using a simple manual find and replace option I can insert delimiters. (Replace Name with ",", for instance). So I have the following (ficticious) entry.

"Ms. Carolina Jones ","Prestige Foods, Ltd.","220 Jones",","","Spa","TX","77329","US","(322) 555-0050","(322) 555-3806","vkpmrd@ prestige.com"

(Next record would be"Mr Joe Dokes","Joe's Bad Burgers","555 555 5555"'.....etc. End with quote...)

Looks good to me. To Pdx it looks like one very long field.Or it looks to Pdx like a whole lot of records in only one field.

So what thoroughly airbrained mistake am I making here? Thanks all.
 
Your 4th field is not valid, it has only one quote ,",.

I corrected the string and imported it with no problems, be sure you are set paradox to import "ASCII delimited" and the delimited settings are correct.

Hope this helps
Perrin
 
jlockley,

Well, if the record you posted as a sample is actually from your data file, I may have an idea.

I started by:

1. Copying your sample record to the Clipboard
2. Pasting it into a text editor I use
3. Adding line breaks after each comma

I came up with the following (note emphasized line):

Code:
"Ms. Carolina Jones ",
"Prestige Foods, Ltd.",
"220 Jones",
Code:
",
<-- Look carefully
Code:
&quot;&quot;,
&quot;Spa&quot;,
&quot;TX&quot;,
&quot;77329&quot;,
&quot;US&quot;,
&quot;(322) 555-0050&quot;,
&quot;(322) 555-3806&quot;,
&quot;vkpmrd@ prestige.com&quot;

It appears you have a mis-matched set of quotation marks. When this happens, Paradox can't break the string apart and assumes you know what you're doing. Thus, it imports the whole line as a single string.

Hope this helps...

-- Lance
 
Thanks to all. That was actually not the problem (I had simply written it wrong..the actual file tallied out on quotations) - but for future reference (mine mostly) I do have the answer to the problems I was having.

The biggest problem was that Paradox and excell were dealing with hard returns as delimiters. The second seems to be that both require each record to be on a new line. By removing all hard returns except those between records (fortunately done by batch) the problem was solved. Oddly enough I neglected to put the quotation at the end of each record. This had no impact.
 
jlockley,

Yes, that's a limitation of Paradox's import process: one line, one record. This means you need to resort to some trickery to export memos containing CR/LF pairs to text files.

For one way to approach the problem, take a peek at which uses a custom procedure to &quot;fix-up&quot; (replace) the hard-coded CR/LF pairs with &quot;\n&quot; sequences.

This helps with things like Word because you can then use the target product's Search and Replace function to replace the &quot;\n&quot; sequences with newlines (^p in Word).

I once used this to create a Word Document that printed the results of enumRTLErrors() in alphabetical order.

In any event, I'm glad to hear you got it taken care of.

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top