Lets say that there are two tables:
Order
ID (PK)
DateExecuted
OrderStep
ID (PK)
Date
OrderID(FK)
One order can have many Order steps.
How can I write a query in the form that it sets the date of each order to the date of the latest order step (belonging to the order where we are setting the date)?
This way if Order1 has 2 order steps associated to it (os1 with date 1.1.2010 and os2 with date 1.1.2011) , the query should set the date of Order1 to 1.1.2011.
Check this: