我试过像这样的mongo导入
mongoimport -d test -c foo importfile.jsonmongoimport --host localhost --db local --collection lecturer --type json --file temp.json --headerline --upsert我有相同的错误消息"语法错误:缺少;在语句(shell)之前:1"我的代码有什么问题以及如果我的数据存储在C:\ Documents and Settings\User\Desktop中如何导入?请提前帮助,谢谢
小智 86
mongoimport旨在在命令提示符下运行,而不是在mongo shell中运行.尝试退出shell并运行命令.