The second row should NOT be removed. because Account_id is not same for both rows.
what i have to do ?
1. i have to compare two rows of data set having same Contact_Objid(not nullable column).
2. if both rows I and J having same Contact_Objid then i have to delete I th row from data set if all other columns of i th rows are having either same value of j th row or Null value.
please give me idea.....how can i implement .....i am thinking about lag function.
is it possible complete all process in one data step...?
assuming you want just the last of equal groups of contact_objid and account_id, you could use by group processing (even if you need to add the notsorted option)
[pre]data new_data ;
do until( last.contact_objid ) ;
set original ;
by account_id notsorted contact_objid notsorted ;
run ;[/pre]However, this method depends on having actual Account_id rather than NULL.