I need to do group by in such a way that name should not display every time, as all attributes are in same entity I am unable to do group by and display other records 



http://www.sqlservertutorial.net/sql-server-window-functions/sql-server-lag-function/

Solution

Hi Mathi,

Do you mean that the second "Rupesh" shouldn't appear in your Output? You cannot do that with the query itself, you need to do that when displaying the name in the Table Records. To do so, check whether the previous item has the same value, and if so don't display it.

Solution

Kilian Hekhuis wrote:

Hi Mathi,

Do you mean that the second "Rupesh" shouldn't appear in your Output? You cannot do that with the query itself, you need to do that when displaying the name in the Table Records. To do so, check whether the previous item has the same value, and if so don't display it.

Done. Thank you. 


You're welcome :)