I have a list of rows in my datatable.
Now I wish to prioritize the rows not according to DESC
or ASC
but based on few similarities of my variables with the row values.
For example,
I have datatable with columns as below:
Name, Location, Age, Sex, Education..
而且,我已经有一些倾向,即看到那些与我教育和地点相匹配的头几行,以及那些与他们相匹配的行子,可以排在第一行之后。
How do I accomplish this?
I tried setting expression in SELECT statement
with OR
and LIKE clause
but I didn t seem to be getting the right answer.
DataRow[] row = ds.Tables[0].Select("Affiliations LIKE %" + ftr2 + "% OR Loc_city LIKE %" + city1 + "% OR Edu_Hist LIKE %" + ftr + "% OR Work_Hist LIKE %" + ftr1 + "% OR Priority= true ");
这里,一意是严格地说,只希望这些价值观,而一味希望这些价值观首先得到支持的偏好环境。