How to bind the value of a field in a query? #11354
Unanswered
brendonky18
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Note that So, what you actually want is binding the divisor to be the same one you are requiring to be equal to 2. Something like: from DivisibleInt i, SmallInt divisor
where i.getADivisor() = divisor and divisor = 2
select i, divisor |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Looking at the documentation on fields. It shows the following class with the divisor field:
I wrote the following query, and it produced some unexpected results.
I was expecting to get all of the even numbers, with just the divisor 2. Instead it gave me all of the even numbers and each of their possible divisors.
Can someone explain why this is happening, and how I could possibly fix my query/class to get the correct result?
Beta Was this translation helpful? Give feedback.
All reactions