See previous related threads:
Edit: With the qualifier that I haven't tried this myself, so it might not work with an external SQL query. And the additional suggestion that repeating fields aren't usually the best solution for storing data; related tables usually serve better.
Yeah, I already tried similar solutions, it's not working with an external sql query. I'm not even sure it's possible.
There are a couple of other things you can try:
1) Create a new calculation field that concatenates all the repetitions together (using GetRepetition). Query that instead.
2) Bite the bullet and rework the repeating field into a related table.
Ideally I would break them out to a separate table, however, with this system, I cannot make those kinds of modifications to the schema due to external applications reading/writing data. I've tried and all hell broke loose.
You can get it as
SELECT field,field,field FROM table
But, this result has 3 columns as same name 'field', it may cause trouble.
If so, add names to columns as
SELECT field f1, field f2, field f3 FROM table