WHERE PropertyAgent.PropertyAgentID = PropertyData.PropertyAgentID
GROUP BY PropertyAgent.PropertyAgentID
If you have agents without properties, you will need an outer join
Pascal
> -----Original Message-----
> From: Stuart Kidd [mailto:[EMAIL PROTECTED]
> Sent: donderdag 19 februari 2004 16:09
> To: CF-Talk
> Subject: DB Stuff
>
> Hi guys,
>
> I'm trying to pull some details from my Access DB. I'm
> trying to list the PropertyAgent's details and also list (as
> a count) how many properties (propertydataid) they have.
>
> <CFQUERY NAME="GetAgentList" datasource="020"> SELECT
> PropertyAgent.PropertyAgentID, PropertyAgent.PropertyAgentCompanyName,
> PropertyAgent.PropertyAgentContactSurname,
> PropertyAgent.PropertyAgentContactFirstName,
> PropertyAgent.PropertyAgentVillageTown,
> PropertyAgent.PropertyAgentAuthorityLevel,
> Count(PropertyData.PropertyDataID) as PropertyCount FROM
> PropertyAgent, PropertyData </CFQUERY>
>
> If somebody could help it would be appreciated.
>
> Thanks,
>
> Stuart
>
> ps: i'm going to put in the cfparams after.
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

