I have 2 openquery statements that I'd like to filter without doing a subquery. How can I do this? the Where Clause is giving me trouble.
--I want to join these 2 statements and filter by the where clause at the bottom within 1
-- OPENQUERY Clause
SELECT *
FROM OPENQUERY (ORDERSVR,'Select * From Global.dbo.GlobalOrders')
SELECT *
FROM OPENQUERY (ORDERSVR,'Select * From Global.dbo.GlobalOrderItems')
--The Where Clause is based on local Variables
WHERE StartDate >= @StartDate and EndDate <= @EndDate