Hi, it does. this techniques, use FM calcs to get the numbers. It need to do different joins and it wont work here. For now I am using # sign and I am goingt o loop thru and add the numbers. I was wondering if there is a sql way.
There isn't generic answer, it is the reason why many of implementation other than FM has ROW_NUMBER function.
If your join result has unique ordered column, count it like as
(SELECT COUNT(*) FROM table AS t2 JOIN ... WHERE ... AND t2.uniq<=t1.uniq),
FROM table AS t1 JOIN ...
ORDER BY t1.uniq
make sub query to same query as outer query, add comparing uniq column.