Designing my first dimension

  • 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

  • already found it my self.

    thx


    JV

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply