在 sqlite 中将 csv 转换为 db
Convert csv to db in sqlite
我有一个带有 ;
分隔符的 csv 文件。我想将其转换为 .db
。我遵循这里的建议:https://www.sqlite.org/cli.html#section_8
在我的 Ubuntu 终端中,我使用:
sqlite3 ex1
那我试试:
.mode list
.separator ";"
.import odberatel.csv odberatel
.save odberatel.db
但是当我在 Db Browser for SQLite 中查看 odberatel.db 时,似乎没有正确分隔:
请问我做错了什么?
来自同一个sqlite doc:
Note that it is important to set the "mode" to "csv" before running the ".import" command.
我有一个带有 ;
分隔符的 csv 文件。我想将其转换为 .db
。我遵循这里的建议:https://www.sqlite.org/cli.html#section_8
在我的 Ubuntu 终端中,我使用:
sqlite3 ex1
那我试试:
.mode list
.separator ";"
.import odberatel.csv odberatel
.save odberatel.db
但是当我在 Db Browser for SQLite 中查看 odberatel.db 时,似乎没有正确分隔:
请问我做错了什么?
来自同一个sqlite doc:
Note that it is important to set the "mode" to "csv" before running the ".import" command.