Re: A Complicated Group Query

2004-06-23 Thread SGreen
otmail.com> cc: Fax to:

Re: A Complicated Group Query

2004-06-22 Thread shaun thornburgh
L PROTECTED] To: "shaun thornburgh" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: A Complicated Group Query Date: Tue, 22 Jun 2004 14:32:14 -0400 OOPS! That's because my second query should have been a LEFT JOIN and not a RIGHT JOIN (I hate making silly cut-and-paste error

Re: A Complicated Group Query

2004-06-22 Thread SGreen
Location FROM Users U LEFT OUTER JOIN Bookings B ON U.User_ID = B.User_ID WHERE U.Client_ID = 'X' GROUP BY(U.User_Location); It works perefectly for all clients that have one project. But I need to be able to produce the same report for individual projects rather than clients! I hope you c

Re: A Complicated Group Query

2004-06-22 Thread shaun thornburgh
s! I hope you can help me here, many thanks! From: [EMAIL PROTECTED] To: "shaun thornburgh" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: A Complicated Group Query Date: Tue, 22 Jun 2004 10:12:22 -0400 Hi Shaun, You said: >SELECT COUNT(B.Booking_ID), U.User_Location

Re: A Complicated Group Query

2004-06-22 Thread SGreen
Hi Shaun, You said: >SELECT COUNT(B.Booking_ID), U.User_Location FROM Users U LEFT OUTER JOIN >Bookings B ON U.User_ID = B.User_ID AND B.Project_ID = '10' GROUP >BY(U.User_Location); > >It returns all User Locations in the User table, regardless of the >Project_ID of the Booking. That's exactly