Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

273
Vistas
MongoDB ReferenceError: Collection is not defined :

Why does MongoDB not allow me to copy one collection into another?

> db.crashntsb.copyTo(crashntsbclean)
2017-01-13T09:09:49.236+0530 E QUERY    [main] ReferenceError: crashntsbclean        
is not defined :

@(shell):1:1
>

It says the new collection is not defined What could be the reason? Do I need to create the collection? In the documentation it says Mongodb creates this new collection https://docs.mongodb.com/v3.2/reference/method/db.collection.copyTo/

Any help greatly appreciated

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

the following code will work for you.

db.crashntsb.copyTo("crashntsbclean")

The double quotes is required although the documentation does not say so.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda