Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am attempting to load data from a text file where the delimiter is '|'
My load statement is
(txt, codepage is 1252, embedded labels, delimiter is '|', msq, no eof )
When the data is loaded though records are jumbled up so for instance you will see sales regions appearing under sales manager.
I have tried both standard and no quotes to no avail. Also checked specific lines using rowNo and a text editor but can't spot anything visible.
I believe this topic has been raised but no resolution was offered.
Thanks
No, it's just the double quote characters
Have you got it working?
Ralf I understand what you're saying but how I can change the only the " quotes that are within the field content without changing the " quotes that are wrapped around each field.
Here is an example :
|"3 ($850 ea.) 6 ½" OD x 12” long with 4 ½" Peco Pin x 4 ½" API Box with 5” tool flats that are 4” long."|
Hi,
You will find that you will get the best help if you post a sample of the data that you are having issues with. At this point all anyone can do is guess what the best solution would be.
Bill
Not sure if this will help you, but I once had a fixed position file (so no delimiters) which had the same problem with jumbled up columns. Never found out what the exact problem was (codepage, strange characters??), however the file loaded fine in SR2. The SR3 and SR5 releases had this problem, now that I'm on SR10 the problem is gone as well (exact same file)
OK here's a small data extract attached. Not a great example but you see the issue happening at row 78. For instance if you look at 'region' it is populated with something from another field.
So if you look the offending line ( search on 'full hd') it has a stray " in the invoice description field. If you remove this " it then works correctly. The question then remains how to get rid of the within the field content only
In this case I was able to get it to load correctly by replacing all occurrences of a double quote followed by a space (" ), with two double quotes followed by a space ("" ) so not to touch the quotes surrounding each field.
It would not catch instances where there would be a double quote not followed by a space of course Then you'd have to get into more advanced string substitution depending on the data.