[thelist] importing a non-standard datadump
Brian Cummiskey
Brian at hondaswap.com
Tue Feb 22 11:24:06 CST 2005
Hi all-
I received a data-dump from a client, and it is in an impossible format.
The biggest issue is that the last field does not fit all on one line
(CR\LF)
here's an example:
'CUSTNMBR'|'CUSTNAME'|'NOTES'
'1'|'blah1' '|'fasdf fsdfd sdf1 '
'2'|'blah2' '|'fasdf fsdfd sdf2 '
that is fine and easy to import. However, there are some rows where the
notes have their own crlf on them like so:
'CUSTNMBR'|'CUSTNAME'|'NOTES'
'1'|'blah1' '|'fasdf fsdfd sdf1'
'2'|'blah2' '|'fasdf fsdfd sdf2'
'3'|'blah3' '|'fasdf fsdfd sdf dfdffsd
fsdfds
fsdfsd
fdsf
sfs3'
'4'|'blah4' '|'fasdf fsdfd sdf4'
There's some 24,000 records here, so going by hand one at a time and
backspacing them out is a last resort.
If i search\replace on the CRLF, i lose every row, not just the notes
row multi-line.
How do I import this?
I have access to MS SQL 2000 and MySQL/phpmyadmin. The end result would
be on a table in MS Sql. If php can do something that asp/mssql cannot,
i can use the import export of the php system to move it to the M$
system afterwards.
I appreciate any help
More information about the thelist
mailing list