Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data loaded from text file appears jumbled up

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

37 Replies
sasiparupudi1
Master III
Master III

Please post your data and script

Not applicable
Author

I think I can see the issue which is basically a load of special characters in the offending records. In this case how would I isolate certain columns from being loaded in ( given this is a text file ) ?

Ralf-Narfeldt
Employee
Employee

It would help if you gave a sample of the offending lines + line before in the text file.

sasiparupudi1
Master III
Master III

You can try loading few columns at a time by commenting some..

Load

   TransactionDate,

   CompanyName

/*,

   Comments,

   CustomerName,

*/

from myfile.csv

You may also want to look at purgechar function  ex:purgechar(Comments,'@&,^$') as Comments

Hope this helps

Sasi

sgrice
Partner - Creator II
Partner - Creator II

I have had this issue when some records do not have all the fields and the output is missing delimitors

I had to load the data has a big string for each record and parse the data manually within qlikview script


awhitfield
Partner - Champion
Partner - Champion

Hi Sid,

can you upload the txt file?

Andy

vlad_komarov
Partner - Specialist III
Partner - Specialist III

Try to remove the 'msq'  from format-spec in your load statement.

Regards,

VK

Not applicable
Author

Hi Vladimir

I tried that but it didnt work.  Unable to upload the text file due to privacy issues unfortunately. Have tried pretty much everything including saving as an excel file / csv but to no avail.

petter
Partner - Champion III
Partner - Champion III

Do you have a fixed number of columns in your text file? Is there a fixed amount of vertical bars in the file for each line? Are you sure that this is a codepage 1252 encoded file?