All,
We are having a problem with sorting the results of a database query.
The result of the query will be used to calculate discount to a customer. The table is then read from right to left.
However, the problem we are facing, is that we are unable to find a proper sort method to sort the results of this query.
The expected result looks like this, where the first line has the highest priority and the last line the lowest priority:
0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 1 1 0 1 0 1 1 0 1 1 0 1 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 0 1 1 0 1 0 1 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 1 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0
Hope anyone has a solution for sorting this result list.
If posible preferable in SQL.
Kind regards, Pieter Jong