The problem is that your desired results require that your TABLE1 be sorted in a specific order, but the data provided is insufficient to enforce that order. You have to remember that there is no default order by in a set.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA