Thank you, pznew. That worked fine.
If my table hade one more variable, F, and looked like this after the PROC SQL:
ID F AMOUNT
2 A 0
2 A 1
2 B 0
4 B 1
4 A 1
4 A 0
4 A 1
6 B 0
6 A 1
Then I would like to get those where the combination of ID and F is the same as the the one where the 0 was, like this:
2 A 0
2 A 1
2 B 0
*** Want deleted because there is no 4 B 0 after the first PROC SQL
4 A 1
4 A 0
4 A 1
6 B 0
*** Want deleted because there is no 6 A 0 after the first PROC SQL
And F is not restricted to just A and B.
I don't think all this could be done in the first PROC SQL, but IF, it would be great.
Susan