我需要使用MongoVUE在MongoDB中找出不同的值(例如: CreationDate或SourceSystem)。仅供参考,我只能使用相同的试用版。
发布于 2012-09-14 03:31:14
我不认为使用MongoVUE可以做到这一点。您可以通过运行如下命令的MongoDB shell来执行此操作:
db.[Collection Name].distinct({Property Name})
ex: db.students.distinct('age')
db.students.distinct('age').length; // gives you the record count我通常发现SQL映射图表页面在这些情况下很有用( http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart )
发布于 2012-09-12 00:31:05
快速浏览一下,我也看不出你是如何做到的,因为"Find“功能迫使你使用:
db.[collectionName].find({...})所以不允许你这样做:
db.[collectionName].distinct({...})我建议使用Mongo的普通命令行可执行文件,而不是MongoVUE,然后您可以使用10Gen文档中的命令:http://www.mongodb.org/display/DOCS/Aggregation#Aggregation-Distinct
https://stackoverflow.com/questions/12373842
复制相似问题