R
Rolf Rosenquist
Simplified, I have one customer table with customer no. and name and one
order table with customer no, order no, valid date from and valid date to.
That means that the order (or contract) is valid from one date to another.
I cannot get a query where I want one row for each customer, showing only
his last order with order no and both dates.
I have tried setting the order no to Max in the query, but get one row for
each order, not every customers last order. The only chance to get one row
for every customer is to set also the two dates to Max, but then I get the
wrong data, not the specific last order per customer, but the last date from
all his orders and that is not the right data. The data should come from
every customer's last order.
Anyone care for helping me with this? I am already grey haired....
/ Rolf
order table with customer no, order no, valid date from and valid date to.
That means that the order (or contract) is valid from one date to another.
I cannot get a query where I want one row for each customer, showing only
his last order with order no and both dates.
I have tried setting the order no to Max in the query, but get one row for
each order, not every customers last order. The only chance to get one row
for every customer is to set also the two dates to Max, but then I get the
wrong data, not the specific last order per customer, but the last date from
all his orders and that is not the right data. The data should come from
every customer's last order.
Anyone care for helping me with this? I am already grey haired....
/ Rolf