Adding Extra Conditions to an INNER JOIN

2008-03-04 Thread Fawzi Amadu
I am trying to use INNER JOIN for my query and have additional conditions, what is the right way to add them? When I run the code below, I get the error shown. How do I get this to work? SELECT v.Party, SUM(v.Votes), s.ConstituencyNo ,c.ConstituencyName, c.RegionCode FROM VoteResults v INNER

RE: Adding Extra Conditions to an INNER JOIN

2008-03-04 Thread Dave Watts
I am trying to use INNER JOIN for my query and have additional conditions, what is the right way to add them? When I run the code below, I get the error shown. How do I get this to work? SELECT v.Party, SUM(v.Votes), s.ConstituencyNo ,c.ConstituencyName, c.RegionCode FROM VoteResults v

RE: Adding Extra Conditions to an INNER JOIN

2008-03-04 Thread Dawson, Michael
://weblogs.sqlteam.com/jeffs/archive/2007/05/14/60205.aspx m!ke -Original Message- From: Fawzi Amadu [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2008 5:35 AM To: CF-Talk Subject: Adding Extra Conditions to an INNER JOIN I am trying to use INNER JOIN for my query and have additional conditions, what

Re: Adding Extra Conditions to an INNER JOIN

2008-03-04 Thread Sonny Savage
Message- From: Fawzi Amadu [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2008 5:35 AM To: CF-Talk Subject: Adding Extra Conditions to an INNER JOIN I am trying to use INNER JOIN for my query and have additional conditions, what is the right way to add them? When I run the code below

Re: Adding Extra Conditions to an INNER JOIN

2008-03-04 Thread Joe Graves
Replace your Where with an AND/OR The where clause must be used after any inner joins SELECT v.Party, SUM(v.Votes), s.ConstituencyNo ,c.ConstituencyName, c. RegionCode FROM VoteResults v INNER JOIN PollingStation s --- ON v.AgentPhoneNo =