but what would u do if u have duplicates row not in one table but after joining to view, i was unable to delete duplicate records then , i got an error message
Msg 4405, Level 16, State 1, Line 1
View or function 'a' is not updatable because the modification affects multiple base tables.
delete from a
from
(select v_rpt_Study_details.StudyId
,view1.col1
,view1.col2
,view2.col1
,view2.col2
,ROW_NUMBER() over (partition by view1.col1
,view1.col2
,view2.col1
,view2.col2 order by view1.col1
,view1.col2
,view2.col1
,view2.col2
,) RowNumber
from view1 inner join view2 on
view1.col1=view2.col1) a
where a.RowNumber > 1