Here is the query that didn't work for my example table when using a subquery.


SELECT ID, AccountID, ClientName, 
        (SELECT TOP 1 
                t2.Notes
                FROM TestTable t2
                WHERE t2.AccountID = AccountID
                        AND t2.ID = ID
        ) AS Notes
FROM TestTable
GROUP BY AccountID, ID, ClientName 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293147
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to