Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shaunsomai
Contributor
Contributor

Carriage Return in Data

Hi

I am getting a carraige return chars coming through in my "|" delimited files. When i read the files in, qlikview picks the carriage return chars and sends the data to the next line hence messing the import of data into the correct fields, I tried to do a search and replace but your default editor like notepad or wordpad doesnt pick it up.

Any suggestions or ideas

Message was edited by: shaunsomai Added sample files

4 Replies
prieper
Master II
Master II

Had something in the past:

Can you load the file as it is, i.e. with CRs and then reload the file in memory and then lateron "glue" the file together as it is needed? Or concatenate each 2nd line? etc.

Can you post an example?

Peter

shaunsomai
Contributor
Contributor
Author

Hi I have attached a sample file as well as test model to illustrate how the data is being read. thanks shaun

prieper
Master II
Master II

Load the csv without any delimiter

Sort records in Descending order

Inspect the start of each record (PEEK), if matching with account-pattern and the previous record not matching, concatenate them.

Filter only for records, where the account-data is matching

Apply logic to split the line into fields (SUBFIELD)

may post a script lateron

HTH
Peter

shaunsomai
Contributor
Contributor
Author

I am comfortable with Loading the file without the delimiter, I asssume the sorting would be on row no ,and Applying logic  and splitting line with Subfield.Problem is identifying the account pattern. Will appreciate a script thanks shaun