Hi Expert,I have a query to filter all acode is equal to "IPH" under acode column but i wanted to display the description of where the RN is equal to 2. May I ask your help guys on how to make this in t-SQL. thanks.btw, the RN column is the result if ROW_NUMBER() over by particion.here is the sample data:Drop table #sampleCreate Table #sample(NAME nvarchar(35), trndate datetime, category nvarchar(35), RN int, wrkctr nvarchar(35), acode nvarchar(5), descript nvarchar(35))Insert into #sample(name,trndate, category, RN, wrkctr, acode,descript) values('xxxx','2014-04-01','fail',1,'','IPH','')Insert into #sample(name,trndate, category, RN, wrkctr, acode,descript) values('xxxx','2014-04-01','fail',2,'552','SELL','Defect')Insert into #sample(name,trndate, category, RN, wrkctr, acode,descript) values('bbbb','2014-04-02','fail',1,'','IPH','')Insert into #sample(name,trndate, category, RN, wrkctr, acode,descript) values('bbbb','2014-04-02','fail',2,'553','SELL','unacceptable')Insert into #sample(name,trndate, category, RN, wrkctr, acode,descript) values('ssss','2014-04-03','fail',1,'','IPH','')Insert into #sample(name,trndate, category, RN, wrkctr, acode,descript) values('ssss','2014-04-03','fail',2,'','MAN','')select NAME, trndate, category, RN, wrkctr , acode, descriptfrom #samplewhere acode='IPH'