At the moment I'm getting into that 10 mins book by Ben Forta (and SAMS publishing).
Is that a good way to go?
It's just that some of this stuff i find is a steep learning curve... the CFML general stuff i can always get my head around, but all this SQL stuff is another thing.
Cheers,
Stuart
---------- Original Message ----------------------------------
From: "Pascal Peters" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Fri, 20 Feb 2004 09:41:04 +0100
>That was me going too fast, nothing to do with no properties. You need
>to have all the fields from the select (exept aggregate functions) in
>the group by clause:
>
><CFQUERY NAME="GetAgentList" datasource="020">
>SELECT
>pa.PropertyAgentID,
>pa.PropertyAgentCompanyName,
>pa.PropertyAgentContactSurname,
>pa.PropertyAgentContactFirstName,
>pa.PropertyAgentVillageTown,
>pa.PropertyAgentAuthorityLevel,
>Count(pd.PropertyDataID) as PropertyCount
>FROM {oj PropertyAgent pa LEFT OUTER JOIN PropertyData pd
>ON pa.PropertyAgentID = pd.PropertyAgentID}
>GROUP BY
>pa.PropertyAgentID,
>pa.PropertyAgentCompanyName,
>pa.PropertyAgentContactSurname,
>pa.PropertyAgentContactFirstName,
>pa.PropertyAgentVillageTown,
>pa.PropertyAgentAuthorityLevel
>ORDER BY
>pa.PropertyAgentContactSurname,
>pa.PropertyAgentContactFirstName
></CFQUERY>
>
>
>> -----Original Message-----
>> From: Stuart Kidd [mailto:[EMAIL PROTECTED]
>> Sent: donderdag 19 februari 2004 17:22
>> To: CF-Talk
>> Subject: RE: DB Stuff
>>
>> Thanks Pascal. Yes some of my Agents don't have properties
>> so i'm gettin the below error:
>>
>> Error Executing Database Query.
>> [Macromedia][SequeLink JDBC Driver][ODBC
>> Socket][Microsoft][ODBC Microsoft Access Driver] You tried to
>> execute a query that does not include the specified
>> _expression_ 'PropertyAgentID' as part of an aggregate function.
>>
>> My code is below:
>>
>> <CFQUERY NAME="GetAgentList" datasource="020"> SELECT
>> PropertyAgent.PropertyAgentID, PropertyData.PropertyAgentID,
>> Count(PropertyData.PropertyDataID) as PropertyCount FROM
>> PropertyAgent, PropertyData WHERE
>> PropertyAgent.PropertyAgentID = PropertyData.PropertyAgentID
>> GROUP BY PropertyAgent.PropertyAgentID </CFQUERY>
>>
>> Do you think that is why the error is coming up like so,
>> because it needs an outer join?
>>
>> Stu
>>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

