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

Cannot use parameter in Select Group Concat with BIT_AND IF condition #11518

Open
CabanesThibault opened this issue Jun 21, 2024 · 0 comments
Open

Comments

@CabanesThibault
Copy link

CabanesThibault commented Jun 21, 2024

Hi,

I encountered an issue while trying to build a query with a BIT_AND condition on a parameter in a Group Concat select statement.

The problematic line is:

Capture d’écran de 2024-06-21 14-39-07

The query (the aidant parameter is set later in a simple where clause, so it does exists in the query):

Capture d’écran de 2024-06-21 15-30-25

If I execute the query, I get an exception "the query define 1 parameter but you bound 2"

If I comment the "setParameter("teacherLeaved", STATUT)", I get an exception "the query define 2 parameters but you only bound 1"

If I explicitly define the value in the select BIT_AND and remove the "setParameter("teacherLeaved")", everything works well.

Capture d’écran de 2024-06-21 14-43-13

I'd tried to use BIT_AND(aa.status, (:teacherLeaved param)) as described here, for param in a select but it don't work neither (i also tried without the "param" at the end of the parenthesis).

I don't really get the point here, is there a reason or is it a lack of support for this kind of usage?

Right now to make it work, i'm just concatenating my value in the select clause and it works like a charm, but i would like to understand the problem.

Capture d’écran de 2024-06-21 15-19-56

@CabanesThibault CabanesThibault changed the title Cannot use parameter in Select Group by with BIT_AND IF condition Cannot use parameter in Select Group Concat with BIT_AND IF condition Jun 21, 2024
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

1 participant