Question
Group By concatenated field in cfquery
SELECT B_Model,B_Year, P_Brand, P_Pitch, count(P_Pitch)as Recordcount,
(P_Brand+' '+ P_Pitch)as Prop
FROM dbo.User_Record
WHERE B_Model = 'COUGAR FTD'
AND
B_Year = '2010'
GROUP BY Prop, P_Brand,P_Pitch,B_Model,B_Year
ORDER BY recordcount DESC
I can't seem to get this query to recognize Prop as a valid field for group by. Any help would be appreciated.
P_Brand and P_Pitch are both nvarchar fields.
Thanks, Allen
