Hi,
I have a situation where financial information in the source system can be amended or reversed.
All records are passed to the DW with each transaction being a fact in the Tran_mvmt table
Dimensions include customer, agent etc with all dimensions being Type 2 with begin and end date
I need to be able to deliver a historic picture reporting a position at any given point in time so I have to sum the values of the facts grouped by the relevant attribute e.g.
select
sum(a.Tran_Val)
,b.agent_name
from
Tran_mvmt a
inner join dim_agent b on
a.agent_id = b.agent_id
where
@Range_Date between a.Begin_Date and a.End_Date
group by b.agent_name
Is this the right way to go?
** Don't reach for the moon when you have the stars. ;-) TheJFM **
I have a situation where financial information in the source system can be amended or reversed.
All records are passed to the DW with each transaction being a fact in the Tran_mvmt table
Dimensions include customer, agent etc with all dimensions being Type 2 with begin and end date
I need to be able to deliver a historic picture reporting a position at any given point in time so I have to sum the values of the facts grouped by the relevant attribute e.g.
select
sum(a.Tran_Val)
,b.agent_name
from
Tran_mvmt a
inner join dim_agent b on
a.agent_id = b.agent_id
where
@Range_Date between a.Begin_Date and a.End_Date
group by b.agent_name
Is this the right way to go?
** Don't reach for the moon when you have the stars. ;-) TheJFM **