Sort based on input parameter in oracle query.

by Vahid 10. January 2009 09:15
Today I was tracing a defect happened in a stored procedure with paging functionality. After spending sometimes on it I came to know that sorting does not work properly. In the order by clause of the procedure we were using an input parameter which holds the column name based on which the result was to be sorted. But it seems that oracle and pl-sql does not support this feature and if we want to sort based on an input parameter we have to go for dynamic query which I don’t like at all.But it's funny that the feature is not there in oracle because the same thing can be done in ms sql server easily.Anyone got some idea about this, please let me know.


Tags: ,