hi good morning
i had a littel problem with my msaccess 2003 , i am writing the query
by using the Group class is working
and its sample code is
"select b.custrefno,SUM(b.paidamount) as paidamount from paym b,addcust a where b.custrefno=a.custrefno GROUP BY b.custrefno";
working prefectly
here it is working in the perfect way , by i need some extra columns so that i had added the Columns names as like name , email,mobile;
so that i had change the query just like this
"select a.email,a.name,a.mobile,b.custrefno,SUM(b.paidamount) as paidamount from paym b,addcust a where b.custrefno=a.custrefno GROUP BY b.custrefno";
i had also tryied like this but
"select email,name,mobile,b.custrefno,SUM(b.paidamount) as paidamount from paym b,addcust a where b.custrefno=a.custrefno GROUP BY b.custrefno";
but last two are not working executing prefectly , it created the error like
Error: You tried to execute a query that does not include the specified expression 'email' as part of an aggregate function.
where i am going wrong, and what's the wrong is , can any body help me
basycally my requirement is by grouping i need to get the Name and mobile number of that particular record