M
Mark
Hi,
There has to be a simple answer to this but I can only
find a convaluted one !
If, for example, a table storing data on product movements
has three fields, product, DateOfMovement and
destination, and i want to run a query to group by the
product, and show the last movement it made, i.e. max of
DateOfMovement, how can I get the same query to return
where that movement went to i.e. destination ? The
aggregate functions just return the last alphabetical
destination within the grouped product not necessariy the
one relating to the last movement. Have considered using
two queries and concatonating the location onto the end of
the date and maxing that but there must be an easier way ?
Can someone help me ? Thanks
Mark
There has to be a simple answer to this but I can only
find a convaluted one !
If, for example, a table storing data on product movements
has three fields, product, DateOfMovement and
destination, and i want to run a query to group by the
product, and show the last movement it made, i.e. max of
DateOfMovement, how can I get the same query to return
where that movement went to i.e. destination ? The
aggregate functions just return the last alphabetical
destination within the grouped product not necessariy the
one relating to the last movement. Have considered using
two queries and concatonating the location onto the end of
the date and maxing that but there must be an easier way ?
Can someone help me ? Thanks
Mark