This is my technical area for troubleshooting and learning new programming skills and much more. Here, you will find answers on a wide range of technologies such as AI, Machine Learning, OpenAI, Databricks, ASP.NET, C#, Python, Microsoft Access, MySQL, Amazon Web Services, SQL Server, PL/SQL, JD Edwards, SAS, Salesforce, APIs, MVC, and many others. Please feel free to visit and join the discussion!
Tuesday, August 19, 2008
SQL-SERVER ROLLUP Onhand quantity JD Edwards
Select CASE WHEN (Grouping(CategoryName)=1) THEN 'MainTotal' ELSE categoryname END AS CategoryName, CASE WHEN (Grouping(ProductName)=1) THEN 'SubTotal' ELSE Productname END AS ProductName, Sum(UnitPrice) as unitprice, Sum(UnitsinStock) as UnitsinStock from jde_rk.dbo.Products Products INNER JOIN jde_rk.dbo.Categories Categories On Products.categoryID = Categories.CategoryID Group By Categoryname, ProductName WITh ROLLUP
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment