Limitation

If the data source SQL is in the following format:

SELECT A, B
FROM Table_C
WHERE X=Y
ORDER BY D, E

and if E is nullable or has non-unique values, custom porlters return unpredictable results when sorted by columns containing duplicated values.

This issue is caused by a known limitation of Oracle row_number() function.

To work around this issue, you should add additional columns with unique values or rowid of the tables in the "from" clause to the "order by" clause. For example:

SELECT A, B
FROM Table_C
WHERE X=Y
ORDER BY D, E

and E should be rowid or a column in Table_C with unique value.

Note: You can add more than one column to the "order by" clause when no column with unique value or rowid is applicable. For performance sake, it is recommended that you add columns with index.