Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Designing my first dimension Expand / Collapse
Author
Message
Posted Thursday, January 24, 2008 8:30 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, June 1, 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
Post #446959
Posted Friday, February 1, 2008 5:41 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, June 1, 2012 2:33 AM
Points: 312, Visits: 179
already found it my self.
thx



JV
Post #450411
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse