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

Multiple inner query inside IN clause does not work #905

Open
jobert21 opened this issue Nov 27, 2019 · 6 comments
Open

Multiple inner query inside IN clause does not work #905

jobert21 opened this issue Nov 27, 2019 · 6 comments

Comments

@jobert21
Copy link

@jobert21 jobert21 commented Nov 27, 2019

Describe the bug
SQL with multiple inner query inside IN clause does not work. Example below

To Reproduce
Steps to reproduce the behavior:

  1. select * from table_a where other_id in ((select id from table_b where name like '%aa%'), (select id from table_b where name like '%bb%'))
  2. CCJSqlParserUtil.parse(sql)
  3. Encountered unexpected token: "in" "IN"

Expected behavior
The query runs properly when executing in SQL Server.

System

  • Database: MSSQL 2012
  • Java Version: 1.7
  • JSqlParser version: 2.1
@wumpz
Copy link
Member

@wumpz wumpz commented Nov 27, 2019

Did you already try the actual version 3.1?

@jobert21
Copy link
Author

@jobert21 jobert21 commented Nov 27, 2019

@wumpz yes. it did not work. but i already have the fix now. :) can i submit pull request for JSqlParserCC.jjt? tested in 2.1. pull request to master branch? how about the tag? thanks!

@wumpz
Copy link
Member

@wumpz wumpz commented Nov 28, 2019

Sure. But I will integrate it in version 3.1. You want to stay with 2.1?

@jobert21
Copy link
Author

@jobert21 jobert21 commented Nov 28, 2019

@wumpz - we still have clients using JRE 1.7. Until we fully migrate to JRE 12 or JRE 1.8 minimum, need to use 2.1.

@wumpz
Copy link
Member

@wumpz wumpz commented Nov 29, 2019

@jobert21 I see. 1.7 was along time ago, at least for me. Do you want your patch merged into some version 2.1.1?

@jobert21
Copy link
Author

@jobert21 jobert21 commented Jan 24, 2020

@wumpz yes. will submit a pull request.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.