i am using sql select query to select record and show in gridview but I am facing sorting problem. I want to select query must be sort DESC (means last inserted record or against last edited row)
here is my query but cannot give me desired result
SELECT Barcode, ProductID, ProductName, SUM(Qty) AS Qty, MAX(Price) AS Price, SUM(Total) AS Total FROM TempInv WHERE (CSNo = 'CS-0000008') GROUP BY Barcode, ProductID, ProductName ORDER BY ProductID DESC, Qty DESC