Search the Blog

Tuesday, September 15, 2020

Azure SQL Server Removinng the duplicated value without rank function

 

Select SQLWorkorderType,sum(sqlworkordertypeid)

 from(


select distinct SQLType as [SQLWorkorderType],0 as sqlworkordertypeid 

from SQLWorkOrderType WOT
Union
select distinct SqlType as [SqlWorkorderType],sqlworkordertypeid from SQLWorkOrderType WOT
) as B GROUP by SqlWorkorderType

No comments:

Post a Comment

Translate