错误:SQLite 从文件导入数据
我正在尝试从以逗号分隔的文件加载数据。示例:
A,positive,9619
A095CDB461A1FEED,positive,1
当我尝试在 sqlite3 数据库中加载此文件时,出现错误:
sqlite> .mode csv feature_category
sqlite> .import /home/harit/work/python/what-twitter-speaks/classifier/data/snap_data_collection/db-positiveTweets feature_category;
Error: no such table: feature_category;
尽管该表已存在。
sqlite> select * from sqlite_master;
table|feature_category|feature_category|2|CREATE TABLE feature_category(feature, category, count)
table|categorycount|categorycount|3|CREATE TABLE categorycount(category, count)
请帮忙,我是 sqlite3 新人,
谢谢
I am trying to load data from a file which is comma-separated. example:
A,positive,9619
A095CDB461A1FEED,positive,1
When I am trying to load this file in sqlite3 database I am getting error:
sqlite> .mode csv feature_category
sqlite> .import /home/harit/work/python/what-twitter-speaks/classifier/data/snap_data_collection/db-positiveTweets feature_category;
Error: no such table: feature_category;
Though the table already exists.
sqlite> select * from sqlite_master;
table|feature_category|feature_category|2|CREATE TABLE feature_category(feature, category, count)
table|categorycount|categorycount|3|CREATE TABLE categorycount(category, count)
Please help, I am new to sqlite3
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题似乎出在命令末尾的分号
;
。尝试
It seems that the problem is the semicolon
;
at end of the command.Try