I have a little problem with the query I create in Visual Studio Designer.
I need a query with lots of OR 'clauses for the same column.
I found the 'IN' statement , but I don’t know how to use it in Visual Studio Designer:
An example IN:
SELECT EmployeeID, FirstName, LastName, HireDate, City
FROM Employees
WHERE City IN ('Seattle', 'Tacoma', 'Redmond')
I tried to do it as follows:
SELECT [MachineryId], [ConstructionSiteId], [DateTime],
[Latitude], [Longitude], [HoursCounter]
FROM [PositionData]
WHERE [MachineryID] IN @MachineryIDs
But that will not work.
Is there any other way to handle multiple offers OR?
Many thanks for your help.
source
share