In SQL Server, we are getting the result as shown here:
But, we need the output as shown here:
Is there any way we can merge the duplicate data through asp.net front-end or through SQL Query / Stored procedure?
In SQL Server, we are getting the result as shown here:
But, we need the output as shown here:
Is there any way we can merge the duplicate data through asp.net front-end or through SQL Query / Stored procedure?
It may not be the preferred solution but it may help you to get data in more appropiate way:
SELECT * FROM [{yourDb}].[dbo].[{yourTb}] ORDER BY ProductName ASC
COMPUTE sum(Quantity) BY ProductName
Result : Item OrderId Quantity
Sum 6
-- continued
Item OrderId Quantity
Sum 21
You can return two tables from stored procedure , one table is having only product detail with total field and another one is having order detail.
Put grid with inner grid.
Now bind parent grid with product table and 2nd grid with order table, it will solve your problem.