query multi tables, count/sum 1 of the tables
- From: "LU" <LU@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 18 May 2005 09:51:13 -0700
I'm quering about 5 tables using inner join. On one of the tables i just
want to count or sum up the results. Here is the example I'm trying to get
working. When I add the SUM(Private.PrivateIDs) I get an error. Is
something like this possible?
SELECT Units.UnitServiceLine, Units.UnitName,
Staffing_Types.StaffingType, Unit_Request.UnitOnDutyStaff,
SUM(Private.PrivateIDs)
FROM Unit_Info
INNER JOIN Unit_Request ON Unit_Info.UIID = Unit_Request.UIID INNER JOIN
Units ON Unit_Info.UnitID = Units.UID
INNER JOIN Staffing_Types ON Unit_Request.STID=Staffing_Types.STID
INNER JOIN Private ON Unit_Info.UIID = Private.UIID
.
- Follow-Ups:
- Re: query multi tables, count/sum 1 of the tables
- From: Hugo Kornelis
- Re: query multi tables, count/sum 1 of the tables
- Prev by Date: Re: Working With Binary Data Types
- Next by Date: Clearing tables
- Previous by thread: Working With Binary Data Types
- Next by thread: Re: query multi tables, count/sum 1 of the tables
- Index(es):
Relevant Pages
|
|