缺少语法;在 mongoexport 声明之前 [英] Syntax missing ; before statement in mongoexport

查看:63
本文介绍了缺少语法;在 mongoexport 声明之前的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下方法导出 mongodb 集合:

I am trying to export mongodb collection with:

mongoexport -d InventoryPLC -c Spectra -o spectra.json;

但它给了我错误:

缺少语法;声明前

我在mongodb网站和其他参考网站上搜索:

I search on mongodb website and other reference websites:

mongoexport -d InventoryPLC -c Spectra;

我想导出收藏.

我检查了 stackoverflow 示例和 mongodb 文档:

I checked stackoverflow examples and mongodb documentation:

mongoexport -d InventoryPLC -c Spectra -o spectra.json;

我想导出收藏,但没有成功.

I want exported collection, but have had no luck.

感谢您的帮助.

推荐答案

您可能正在尝试从 Mongo shell 内部运行 mongoexport.该命令必须在其外部执行,从您的操作系统命令外壳.

You are probably trying to run mongoexport from inside the Mongo shell. That command must be executed outside it, from your OS command shell.

这篇关于缺少语法;在 mongoexport 声明之前的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆