dbaSQL
asked on
2 left joins and an INNER
i have a couple left joins -- to which i need to add an inner join -- and i'm not at all sure about they syntax, or even the integrity of something like this
---current:
select blah blah blah
from database.dbo.TradeTable tr
left join lflagtranslate lft
on tr.lflag = lft.lfag
left join symbolstuff sdd
on tr.symbol like sdd.symbol
......
....
i need to inner join the TradeTable to the EGroups table for a list of endpoints, like this:
--need to add
select blah blah blah
from database.dbo.TradeTable tr INNER JOIN
server2.database.dbo.egrou ps eg
on tr.endpoint = eg.endpoint
and eg.egroup = 'AAAA'
what's the correct way to combine the three? ( 2 left joins and the inner )
---current:
select blah blah blah
from database.dbo.TradeTable tr
left join lflagtranslate lft
on tr.lflag = lft.lfag
left join symbolstuff sdd
on tr.symbol like sdd.symbol
......
....
i need to inner join the TradeTable to the EGroups table for a list of endpoints, like this:
--need to add
select blah blah blah
from database.dbo.TradeTable tr INNER JOIN
server2.database.dbo.egrou
on tr.endpoint = eg.endpoint
and eg.egroup = 'AAAA'
what's the correct way to combine the three? ( 2 left joins and the inner )
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you much