DataSet with many OR clauses
Posted
by Silvan
on Stack Overflow
See other posts from Stack Overflow
or by Silvan
Published on 2010-03-08T08:41:38Z
Indexed on
2010/03/08
8:51 UTC
Read the original article
Hit count: 265
Hello :)
I've got a little problem with a query which I create in the Visual Studio Designer.
I need a query with a lot of 'OR'-clauses for the same column.
I found the operator 'IN', but I don't know how to use that in the Visual Studio Designer:
Example IN
:
SELECT EmployeeID, FirstName, LastName, HireDate, City
FROM Employees
WHERE City IN ('Seattle', 'Tacoma', 'Redmond')
I tried to do it in this way:
SELECT [MachineryId], [ConstructionSiteId], [DateTime],
[Latitude], [Longitude], [HoursCounter]
FROM [PositionData]
WHERE [MachineryID] IN @MachineryIDs
But this doesn't work.
Is there another way to handle a lot of OR
clauses?
Thank you very much for your help.
© Stack Overflow or respective owner