0

Please help with error below when running in mongodDb shell, thanks,

> use mvp_demo
switched to db mvp_demo
> show collections;
1476851599865_IND_TRX
1476851599865_NIN_TRX
1476851599865_SWF_TRX
configuration
> db.1476851599865_IND_TRX.remove({})
2017-02-16T22:34:29.377-0500 E QUERY    [thread1] SyntaxError: identifier   starts immediately after numeric literal @(shell):1:2
Shihan Rehman
  • 133
  • 1
  • 7
  • I don't think the collection name is valid, look at this http://stackoverflow.com/questions/9868323/is-there-a-convention-to-name-collection-in-mongodb – Srinivas Damam Feb 17 '17 at 04:05

1 Answers1

1

The problem is that mongodb wasn't designed to have a number as the first character in a collection name, similar to how JavaScript doesn't let you begin a variable name with a number. But to get around this limitation please try running the following:

db["1476851599865_IND_TRX"].remove({})
Mohammad Ali
  • 878
  • 8
  • 16