× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
tariqrahiman reported 2013-04-09T22:14:53Z  · last modified 2013-04-12T20:46:45Z

IN clause doesn't work with one item only


Dev
Emil Goicovici
emil.goicovici
QA
Jenny Nishimura
JennyNishimura
Priority Low
Complexity Unknown
Component MongoSQL
Version 14.0
Version: 14.0-dev-36
Build #: 31873
Build Date: 2013-Apr-09 09:02:56 AM
 
1. Use the below insert to create a collection in mongodb
2. Open a query window and execute below 3 queries
 

select * from baseball

where city in ('Chicago')

go

 

select * frombaseball

where city in ('Chicago')

go

 

3. You can see that for the 1st query you get "invalid query" and for 2nd query you get SQL Syntax error. If you replace the () with [] the query works fine

>[Error] Script lines: 1-3 --------------------------

 com.mongodb.MongoException: invalid query

 
 
INSERT INTO baseball
 
VALUES (
{
"teamName": "Cubs-2",
"city": "Chicago",
"valuation": 10,
"managerName": { "first": "John", "last": "Zimmer" },
"colors": [ "blue", "gray" ],
"stats":
[
{
"year": 1904,
"wins": 100,
"mostRbis": 1000,
"grade": "A",
"battingAvg": 0.300
},
{
"year": 1987,
"wins":80,
"mostRbis":200,
"grade":"A",
"battingAvg":0.267
}
]
} )
1 attachment

Issue #8643

Closed
Fixed
Resolved 2013-04-10T09:00:13Z
 
 
Completion
No due date
Fixed Build nosql-jdbc 1.1.1
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017