0

mysqlコマンドを使用して、次のcsvをmysqlテーブルにインポートする方法は?

##
#File name : proj.csv
 #line 1 are the field headers
 #record 1 starts at line 2, ends at line 583
 #from line 2 "<!DOCTYPE" to line 582 "</html>" are actually text blob of
 #record 1 's "html" field
##

line 1: "proj_name","proj_id","url","html","proj_dir"
line 2: "Autorun Virus Remover",1,"http://www.softpedia.com/get/Antivirus/Autorun-Virus-Remover.shtml","<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN"" ""http://www.w3.org/TR/html4/loose.dtd"">
line 3: <html>
line 4: <head profile=""http://a9.com/-/spec/opensearch/1.1/"">
...
line 582: </html>
line 583: ","Antivirus/Autorun-Virus-Remover"

問題は、ターゲット csv ファイルにテキスト blob フィールド (「html」という名前で、複数行のテキストを含む) が含まれているため、「\n」をレコード セパレータとして使用できない、または次のように表示されることです。 「行1にはすべての列のデータが含まれていません」. 多大なる感謝 !!!

4

0 に答える 0