This is my Technical area of troubleshooting and learning new Programming skills and many more. Here you will find answers for many new technologies like asp.net 2.0/3.5,4.0 C# access, mysql, Amazon Webservice ,Sql-server, JD Edwards, SAS, Salesforce, APIs, MVC and many more. please visit & discuss.
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