sql for summing data in fields
want to find the sum of two fields in an access database linked to a visual basic datagrid.
the sum is performed on a previous search say volume,weight of some goods imported by a particular individual.
Web Development
want to find the sum of two fields in an access database linked to a visual basic datagrid.
the sum is performed on a previous search say volume,weight of some goods imported by a particular individual.
by glen_mcleod
Change the grid's recordsource from the table to a query.
Select a, b, c, d, (Volume * Weight) as e
From TourTableNameHere
Where .....
Save the query in the DB and set the grid's recordsource to the query.
Glen
by dbassaw
by churdoo
SELECT importedBy, Sum(volume) AS sumVol, Sum(weight) AS sumWt
FROM myTable
GROUP BY importedBy
HAVING (importedBy='thatguy')
will return a result record containing the sum of the volume and weight of all goods imported by 'thatguy'
--Charlie
by dbassaw
by dbassaw
This discussion is closed to new replies.
Sort by Trending