Link to home
Start Free TrialLog in
Avatar of e_senthil
e_senthil

asked on

using SQL Number funcitons in the Sort Expression of DataTable Select method

hi,
     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"

full code

  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

senthil


 
ASKER CERTIFIED SOLUTION
Avatar of Nightman
Nightman
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi e_senthil

Was I able to assist? If not, please can you provide some feedback. Alternatively, have a look at https://www.experts-exchange.com/help.jsp#hs5 for information on closing questions.

Regards
Nightman