Here is my situation:
I have 2 tables joined on the customer ID. I want to display information from both tables. The problem I have is if the customer has more than 1 order they are displayed twice. What I would like to do is display the customer information with the appropriate order information for the latest order, even if that customer has not placed an order with us yet.
Basically, what I need to do is find a way to see if my customer has an order, if it does use maximum(fld, condFld) only when there is more than 1 order.
If I use the maximum function on the order_date field then I sucessfully show only the latest order however if there are no orders, the customer information does not display on the report.
Thanks for any help
John
I have 2 tables joined on the customer ID. I want to display information from both tables. The problem I have is if the customer has more than 1 order they are displayed twice. What I would like to do is display the customer information with the appropriate order information for the latest order, even if that customer has not placed an order with us yet.
Basically, what I need to do is find a way to see if my customer has an order, if it does use maximum(fld, condFld) only when there is more than 1 order.
If I use the maximum function on the order_date field then I sucessfully show only the latest order however if there are no orders, the customer information does not display on the report.
Thanks for any help
John