I have a pipe separated file with the format something like below
1|ABC|11|DEF|111
2|ABC|22|PQR
ST
UW|222
3|ABC|33|XYZ|333
4|ABC|44|LMN|444
Now for the line starting with 2
when I try to insert this record into the table the record is inserted only till PQR
and start inserting the record from the line starting 4
I would appreciate if there is any command to bring all of the line 2 record into single line which would help me to insert the line 2 into the table successfully?
2|ABC|22|PQRSTUW|222
I suggest you clarify what starts a record. like Newline followed by decimal number followed by "|" or something. Right now it could beX|anything|anything|angthing|XXX
where X is some particular digit. – infixed Jun 01 '16 at 22:14PQR \n ST \n UW
is actually all a single field. Ugh. Can you amend your file generator to encode the embedded newlines? That would make things far, far, simpler than trying to work around this broken format that you've currently been given. – Chris Davies Jun 01 '16 at 22:25