Note that there are some explanatory texts on larger screens.

plurals
  1. POtwo dimensions with different dates in fact table
    primarykey
    data
    text
    <p>I'm trying to get around this but can't think of anything. </p> <p>I have 5 dimensions two of which have different dates. Specifically, </p> <pre><code>TEMP_REQUEST ------------ temprequest_id localcouncil_id request_date </code></pre> <p>The other table is:</p> <pre><code>SESSION -------- session_id temprequest_id session_date status . . </code></pre> <p>Now I'm populating the fact using a cursor like this:</p> <pre><code>seq NUMBER; v_timeid NUMBER; Cursor c_factable is select dw_localcouncil2.localcouncil_id, dw_session2.session_id, dw_temp2.temp_id, dw_temprequest2.temprequest_id, dw_typeoftempcover2.type_of_cover_id, dw_session2.session_date from DW_LOCALCOUNCIL2, DW_SESSION2, DW_TEMP2, DW_TEMPREQUEST2, DW_TYPEOFTEMPCOVER2 where dw_temprequest2.localcouncil_id = dw_localcouncil2.localcouncil_id AND dw_session2.temprequest_id = dw_temprequest2.temprequest_id AND dw_session2.temp_id = dw_temp2.temp_id AND dw_session2.type_of_cover_id = dw_typeoftempcover2.type_of_cover_id; begin dbms_output.put_line('it is running!'); for c_rec in c_factable loop SELECT time_id INTO v_timeid from dw_time where session_date = c_rec.session_date; insert into DW_SESSIONS_FACT values(v_timeid, c_rec.localcouncil_id, c_rec.session_id, c_rec.temp_id, c_rec.temprequest_id, c_rec.type_of_cover_id); end loop; </code></pre> <p>My question is that the time_id field in the fact table corresponds to the session_date from the SESSION table and not for the TEMP_REQUEST table. Now If i wanted to query the fact table for a query such as this: <code>the number of temp requests by week!</code> I don't know how I would go about doing that with the current state of the fact table. </p> <p>any help is greatly appreciated! </p> <p>The time dimension has been generated and populated beforehand. Includes all dates between a start date to an end date. It contains the follow columns:</p> <pre><code>TIME_DIM --------- time_id session_date t_day, t_month, t_year </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload