This query is run on AdventureWorks2014.Sales.SalesOrderDetail table.
My query: in the CASE clause I have clearly stated to show - when it is the ELSE case. This query removes the repeating SalesOrderID and after 1st time shown it should be replaced with "-" this character.
SELECT
CASE WHEN ROW_NUMBER() OVER(PARTITION BY SalesOrderID ORDER BY SalesOrderID ASC) = 1 THEN SalesOrderID ELSE '-' END AS SalesOrderID,
R.ProductID,
R.OrderQty,
R.UnitPrice,
R.LineTotal
FROM AdventureWorks2014.Sales.SalesOrderDetail AS R
currently showing 0 even though i said in the ELSE to show me -

