Joinutility seperatorLogin utility separator Infobright.com
   
 
Handling newline characters in data ?
Posted: 03 February 2010 12:29 AM   Ignore ]  
Newbie
Rank
Total Posts:  30
Joined  2009-11-09

Hi there,

Has anybody managed to handle new line characters in data file (csv) while loading using the load data command ?

My data file has some, and each time one is encountered, the load is aborted. :(

One way is to handle possible newline characters on the source side, and the other way is to handle them during the load. Since its going to be a much bigger effort on source side, I am looking for ways to handle it on loading time.

any ideas ? anybody came through this earlier ??

pls share…

Profile
 
Posted: 03 February 2010 04:34 AM   Ignore ]   [ # 1 ]  
Sr. Member
Avatar
RankRankRankRank
Total Posts:  648
Joined  2008-08-18

Hi !

What about LOAD .... FIELDS ENCLOSED BY ‘“’ ...

Surely, the load file must be prepared in such a way, that the strings are enclosed in ” (or any other character of your choice). Loading new line characters has been practiced since early days of IB in this way. Be aware, that the enclosing character must not appear as a part of the string (unless escaped).

Profile
 
Posted: 04 February 2010 12:27 AM   Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  30
Joined  2009-11-09

I knew about this option.. but somehow didnt think of it.
worked perfectly. thanks for the tip.

Profile