I am seeking to port an SQL query that basically retrieves daily sales aggregates (SQL pasted below) into its equivalent for Microsoft RMS. I am very new to RMS. I need to access to those data in a programmatic manner to export into another application.
Do someone knowns how to do that?
Thanks in advance, Joannès
select ProductId, Sku, ProductName, OrderDate, Quantity from (select CSK_Store_Product.productID as [ProductId], CSK_Store_Product.sku as [Sku], CSK_Store_Product.productName as [ProductName], DATEADD(dd, DATEDIFF(dd, 0, CSK_Store_Order.orderDate), 0) as [OrderDate], Sum(CSK_Store_OrderItem.quantity) as [Quantity], row_number() over (order by CSK_Store_Product.sku) as [RowNumber] from CSK_Store_Product inner join CSK_Store_OrderItem on CSK_Store_OrderItem.productID CSK_Store_Product.productID inner join CSK_Store_Order on CSK_Store_Order.orderID CSK_Store_OrderItem.orderID inner join CSK_Store_ProductStatus on CSK_Store_ProductStatus.statusID CSK_Store_Product.statusID where CSK_Store_ProductStatus.statusID = @FirstRowNumber and RowNumber < @LastRowNumber order by Sku, OrderDate;