using SQL Number funcitons in the Sort Expression of DataTable Select method
Posted on 2006-11-27
I want to sort the DataTable records based on Sort expression of Select method.
Actually I am loading Data Table records from a xml file.
There is one column called "ROWID", this type is char but it contains integer values.
I want to sort the records based on integer values of the column (ROW_ID).
So I use the sort expression something like " To_Number(ROW_ID) ASC"
DataRow _drowDataPoints = dtConfigData.Select("Division='PSI", "To_number(ROW_ID) ASC");
but it throws an error saying there is no such column "To_number(ROW_ID) ASC" exists in the DataTable.
I want to sort the records based on number value of the column not char value.
Could you please help me out how to achieve this?
thanks in advance