$P{parameterName} in sql statement (fetch first N rows only)
Posted on August 18, 2014 at 1:28pm
If I try to include a parameter in my sql statement
select * from table where (...) group by (...) fetch first $P{param} rows only
I get the error "mismatched input '$P{param}' expecting RULE_INT"
$P{param} should evaluate to an integer, as set by the user.
How could this error be avoided ?
Thanks !
Joined: Jul 28 2014 - 11:17am
Last seen: 8 years 3 weeks ago
Posted on August 19, 2014 at 1:01pm
Use $P!{param}.
The exclam makes the value an unquoted string.
Joined: Oct 22 2008 - 3:26am
Last seen: 7 years 11 months ago
Posted on August 20, 2014 at 7:14pm
Thank you so much for your answer, but I am still getting the same error ....
Joined: Jul 28 2014 - 11:17am
Last seen: 8 years 3 weeks ago
Posted on August 21, 2014 at 7:24am
anyone has any other suggestion on this issue ? Thanks !
Joined: Jul 28 2014 - 11:17am
Last seen: 8 years 3 weeks ago
Posted on May 18, 2016 at 8:36am
Hello,
Did you find how to get it work ? I have the exact same issue.
Thanks
Charlotte
Joined: May 18 2016 - 8:28am
Last seen: 6 years 3 months ago