Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このようなデータテーブルがある場合:
pic_id selected 1 1 1 1 1 0 2 0 2 0 2 0
ユニーク(pic_id)を取得したい
ただし、少なくとも 1 つの写真 (同じ ID を持つ) のselected値が 1 であるという条件の下で
selected
前の例では
私はこのような結果が欲しい:
1 1
var list = dataTable.Select("selected = 1"); var uniqueList = list.Distinct().ToList();