Link to home
Start Free TrialLog in
Avatar of dbaSQL
dbaSQLFlag for United States of America

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.egroups 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 )
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dbaSQL

ASKER

oh my goodness, angell.  pretty darned easy... i was thinking i needed the inner up top, and i had done exactly the reverse of yours

thank you much