I hope this is the correct place for this posting. My problem may be better solved within a DATA step.
I have a table with two different ID fields: ParentID and SubID. In this table, ParentID is not unique. SubID is not unique either, and any one ParentID may be associated with multiple SubIDs. However, no SubID should appear for more than one different ParentID. But there are some records scattered in my table where this occurs, and I need to find them.
So this table would be fine if it looked like this:
ParentID, SubID
123, 990
123, 991
124, 992
124, 992
But this table would NOT be ok, because SubID 990 occurs for two different ParentIDs:
ParentID, SubID
123, 990
123, 991
124, 992
124, 990
My table has thousands of records, so eyeballing the data is not an option. How can I find the records with a SubID that appears for more than one ParentID, with SAS code?
Thank you,
Brett