wrote:
wrote:
Hi Ricardo, If defining a variable absolutely does not work, you can use a cte to achieve your desired effect. Ctes can reference themselves, so you can fetch one record at a time and keep incrementing your counter. This is, however, a very complex construct to achieve such a simple result and probably not performant at all but it should do what you want if you find no other way.
For now I am using a for each cycle after the query to add the rownumber by using the "CurrentRowNumber" attribute. Not the most performant way to do it but it works.
Now here comes a dumb question, what is cte? :)
That is probably your best solution as of now.
There are no dumb questions :) you can read about cte's here https://dev.mysql.com/doc/refman/8.0/en/with.html