I am using OLEDB connection to read data from excel files. I am facing issues while using IN operator in the Select query.
Below is my query,
string EmployeeIds = "'1231','1232','1233'";
SELECT [Employee Number],[Employee Name],[First In Time],[Last Out Time],[Total Work Hours]
FROM [Sheet0$A2:J]
WHERE [Employee Number] IN (?);
comm.Parameters.AddWithValue("?",EmployeeIds);
I am getting empty results but if I give only single value then I am getting result. Please help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…