|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Friday, June 01, 2012 2:33 AM
Points: 312,
Visits: 179
|
|
Hi
My regular query (relational database) is :
select year(CLE.[Due Date]) as Jaar, month(CLE.[Due Date]) as Maand, DATEPART(week, CLE.[Due Date]) as Week, sum(GLE.[Remaining Amount]) as Saldo from dbo.[FIN SEPIA$Cust_ Ledger Entry] as CLE join dbo.[FIN SEPIA$G_L Entry] as GLE on GLE.[Document No_] = CLE.[Document No_] where CLE.[Document Type] = '2' and CLE.[Open] = '1' and GLE.[G_L Account No_] = '400000' and DATEPART(week, CLE.[Due Date]) in (@parWeek) and year(CLE.[Due Date]) in ('2007','2008') group by year(CLE.[Due Date]), month(CLE.[Due Date]), DATEPART(week, CLE.[Due Date]) I guess the dateparts are coming from a time dimension, but my amounts are in fact a join between two tables and a where clause. How should I build up my dimension or is this a fact table ?
Many thanks in advance El Jefe
JV
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Friday, June 01, 2012 2:33 AM
Points: 312,
Visits: 179
|
|
already found it my self. thx
JV
|
|
|
|