i have a table in sql 2005 with the following fields:
tblOrders: Customer, OrderStatus, Date
I need to find all orders that have been resubmitted once rejected, by Customer. For example:
Customer OrderStatus Date
abc group rejected 12/12/2006
fgh inc pending 12/13/2006
abc group submitted 1/7/2007
fgh inc submitted 1/7/2006
fgh inc rejected 1/9/2006
the result here should be only:
abc group because they are the only ones that were rejected at some date in the past and then resubmitted.
fgh in would not be in this list because following their rejection they did not resubmit anything...