Is there any change to x or me->db_table between those two statements? If not, simply do
SELECT * FROM (me->db_table)
UP TO mynumber ROWS
INTO CORRESPONDING FIELDS OF TABLE mytable
WHERE x = y
AND n = m
ORDER BY (x).
append lines of mytable to mytable.
I'm not sure if the last statement issues a syntax error, if so, try
SELECT * FROM (me->db_table)
UP TO mynumber ROWS
INTO CORRESPONDING FIELDS OF TABLE tmp
WHERE x = y
AND n = m
ORDER BY (x).
append lines of tmp to mytable.
append lines of tmp to mytable.
where tmp should have the same type as mytable. The point is, that both selects are identical, therefore the result is, that you'll have the same data in mytable twice.