Hello,
in the query below, the sorting does not seem to work. When I run the query in Query Designer, the values come out correct with the highest value on top, but when I run it in preview it does not. Why?
SELECT ie.Market AS Marknad, ie.[Sales Area_Buyer] AS Distrikt, ie.Statisticscustomer_Supplierno_ AS KundNr, cu.Name, SUM(ie.[Src_ Curr_ Amount]) * - 1 AS 'local'
FROM [Table1] AS ie INNER JOIN
[Table2] AS cu ON cu.Market = ie.Market AND cu.No_ = ie.Statisticscustomer_Supplierno_
WHERE (ie.Market = @Marknad) AND (ie.[Sales Area_Buyer] = @Distrikt)
GROUP BY ie.Market, ie.[Sales Area_Buyer], ie.Statisticscustomer_Supplierno_, cu.Name
ORDER BY 'local' DESC