Scenario:
Below is the table script
Create table dbo.TableA(TID int,Tvalue int,nTime int)
Go
Insert Into dbo.TableA Values(1,2,4),(2,5,3),(3,6,2)
GO
TID | Tvalue | nTime |
1 | 2 | 4 |
2 | 5 | 3 |
3 | 6 | 2 |
Display result as below based on nTime Value. Please do the needful.
TID | Tvalue |
1 | 2 |
1 | 2 |
1 | 2 |
1 | 2 |
2 | 5 |
2 | 5 |
2 | 5 |
3 | 2 |
3 | 2 |