dbTalk Databases Forums  

Inventory Data Mart / Cube problem

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Inventory Data Mart / Cube problem in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter Koller
 
Posts: n/a

Default Inventory Data Mart / Cube problem - 12-01-2003 , 03:18 AM






Hi group!

Im trying to build an inventory Mart / Cube.
My source data looks something like:

TransActionDate, TransactionTime, ProdId, InventoryBalance, QTY_Added,
QTY_Removed .....

The InventoryBalance is the number of items of ProdId after the transaction
has run

In my Mart I have a time dimension where the lowest level is Day.

In a day, multiple transactions may exist in my source data for the same
prodid.

Does anyone have any clever SQL that retrieves the sum of QTY_Added and
QTY_Removed and then the InventoryBalance that occured LAST that day (ie
max(transactiontime) for that day) so that i get one row per day for any
prodid?

Also im having trouble with the InventoryBalance Meaure. This is not an
additive measure, how should i handle this in aggregations?

Any help greatly appreciated!

Cheers,

Peter



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.