85
Views
4
Comments
Solved
Group by
Question

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 



Capture.PNG
2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
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.

UserImage.jpg
Tamil Mathi Pari

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. 


2025-01-09 14-56-57
IQ78
http://www.sqlservertutorial.net/sql-server-window-functions/sql-server-lag-function/

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
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.

UserImage.jpg
Tamil Mathi Pari

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. 


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

You're welcome :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.