QuestionQ14

VerifiedData Manipulation

Data from an Excel file is read into a data table named dtEmployee, as shown in the following graphic:

Question Image

A developer must filter the data table to retrieve all rows for employees in the Finance and IT departments whose Salary is below 30,000. Which expression produces the required results?

Explanation

The filter must match either IT or Finance and also require [Salary] < 30000. Parentheses ensure that the department alternatives are grouped before the salary condition is evaluated. DataTable.Select uses DataColumn expression rules, which support AND, OR, parentheses, and comparison operators.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!