SAMS
Oct 8th, 1999, 09:23 AM
Hi guys, Is there a way whereby i could select all the content in the table when using group by??
The code below works.
Select CLAIMNO, Format(sum(NET),'######0.00') from export_comp GROUP BY CLAIMNO order by CLAIMNO asc
But when I added (Vend_id & Clinic):
Select CLAIMNO, Vend_id, Clinic, Format(sum(NET),'######0.00') from export_comp GROUP BY CLAIMNO order by CLAIMNO asc
The following error message appears:
"You tried to execute a query that does not include specified expression as part of an aggregate function".
Thks & regards.
I know that i could actually include the other content by adding them into group by, but I did not want that, so is there another way out??
e.g.:
Select CLAIMNO, Vend_id, Clinic, Format(sum(NET),'######0.00') from export_comp GROUP BY CLAIMNO, Vend_id, Clinic order by CLAIMNO asc
[This message has been edited by SAMS (edited 10-08-1999).]
The code below works.
Select CLAIMNO, Format(sum(NET),'######0.00') from export_comp GROUP BY CLAIMNO order by CLAIMNO asc
But when I added (Vend_id & Clinic):
Select CLAIMNO, Vend_id, Clinic, Format(sum(NET),'######0.00') from export_comp GROUP BY CLAIMNO order by CLAIMNO asc
The following error message appears:
"You tried to execute a query that does not include specified expression as part of an aggregate function".
Thks & regards.
I know that i could actually include the other content by adding them into group by, but I did not want that, so is there another way out??
e.g.:
Select CLAIMNO, Vend_id, Clinic, Format(sum(NET),'######0.00') from export_comp GROUP BY CLAIMNO, Vend_id, Clinic order by CLAIMNO asc
[This message has been edited by SAMS (edited 10-08-1999).]