Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IN clause does not work #23

Closed
amullins opened this issue Nov 12, 2014 · 2 comments
Closed

IN clause does not work #23

amullins opened this issue Nov 12, 2014 · 2 comments

Comments

@amullins
Copy link

Trying to execute a simple query that contains an IN clause.

SELECT * FROM mysql_driver WHERE id IN (1,2,3)

This is the error I'm receiving:

ERROR: failed to execute the MySQL query:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''{1,2,3}')))' at line 1

If I retrieve the ids with a subquery, it works.

SELECT * FROM mysql_driver WHERE id IN (SELECT id FROM mysql_driver WHERE id < 4)
@ibrarahmad
Copy link
Contributor

I have fixed the issue. I will push the fix after some testing.

Currently working on regression test cases so don't want to push anything
before the comprehensive test cases.

On Wed, Nov 12, 2014 at 8:04 PM, Andrew Mullins notifications@github.com
wrote:

Trying to execute a simple query that contains an IN clause.

SELECT * FROM mysql_driver WHERE id IN (1,2,3)

This is the error I'm receiving:

ERROR: failed to execute the MySQL query:
You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near ''{1,2,3}')))'
at line 1

If I retrieve the ids with a subquery, it works.

SELECT * FROM mysql_driver WHERE id IN (SELECT id FROM mysql_driver WHERE id < 4)


Reply to this email directly or view it on GitHub
#23.

Ibrar Ahmed
EnterpriseDB http://www.enterprisedb.com

@ibrarahmad
Copy link
Contributor

I pushed a fix along with the test cases. "NOT IN" with sub-select will not work. I have created a new case for that and will push the fix for that ASAP.

Isseue: #24 "NOT IN with Sub-select is not working"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants