I have a table (#tblAccessList) which stores information about our Access to each group. For some groups the access type is 'Modify' and 'Read' in the table. I would like to delete the record which has 'Read' for that group and keep the 'Modify' because it is assumed that a group with Modify access also has read.Here is the ddl, sample data and the output I would like to see:create table #tblAccessList(SecGrp varchar(100), Access varchar(10)) insert into #tblAccessList values ('AdmAccess','Modify') insert into #tblAccessList values ('AdmAccess','Read') insert into #tblAccessList values ('AcctAccess','Read') insert into #tblAccessList values ('FinAccess','Modify') insert into #tblAccessList values ('DevAccess','Modify') insert into #tblAccessList values ('DevAccess','Read') insert into #tblAccessList values ('ProdAccess','Modify') insert into #tblAccessList values ('TestAccess','Read')
OUTPUT:SecGrp | Access-----------------------AdmAccess | ModifyAcctAccess | ReadFinAccess | ModifyDevAccess | ModifyProdAccess | ModifyTestAccess | Read