group data in flex list

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

group data in flex list

FlexCoders mailing list
Hello guys i have the following tables; biodata[biodata_id, f_name, l_name, o_name, team], collections[collections_id, ID_biodata, amountPaid, amountExpected, balance, quater, datePaid].

 There are 5 teams each with 4 members. i would like to generate a list in flex to show how much each member has paid and to display the data by showing only 5 teams and members in each team under the team name.

 i have the following query but i get errors. could someone please help me.

 <cffunction name="getTeams" output="false" access="remote" returntype="query">
 <cfset var qteams = "" />
         <cfset var result= "">
         <cfquery datasource="bond100" name="qteams">
         SELECT biodata_id, f_name + ' ' + l_name AS fullname, o_name, team, collections_id, ID_biodata, amountPaid, amountExpected, balance, datePaid
             FROM biodata, collections
             WHERE biodata_id = ID_biodata        
         <cfquery dbtype="query" name="results">
         SELECT team, fullname, amountPaid, amountExpected, balance, datePaid
             FROM qteams
             GROUP BY team          
         <cfreturn results/>

 the error i get is "The column qteams.fullname is invalid in the SELECT list clause because it is not contained in either an aggregate function or the GROUP BY clause."