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
If there are more than one item in the IN list, the query works.
SELECT * FROM baseball WHERE city IN ('New York', 'Chicago')
works.
SELECT * FROM baseball WHERE city IN ('New York')
gives "invalid query" error.
Tariq, it is valid that your 2nd query complains about syntax error because there is no space between "from" and "baseball" and therefore the FROM keyword is missing.
Those two queries do have different errors and therefore it is correct that they produce different exceptions.
Those two queries do have different errors and therefore it is correct that they produce different exceptions.
Issue #8643 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build nosql-jdbc 1.1.1 |
No time estimate |
If there are more than one item in the IN list, the query works.
SELECT * FROM baseball WHERE city IN ('New York', 'Chicago')
works.SELECT * FROM baseball WHERE city IN ('New York')
gives "invalid query" error.Tariq, it is valid that your 2nd query complains about syntax error because there is no space between "from" and "baseball" and therefore the FROM keyword is missing.