dear andra,

konsep PL/SQL di SCD type 2 sendiri menurut saya kira2
begini: (berdasarkan info yg pernah saya dapatkan)
algorithmanya adalah:

FOR ALL ROWs in the SOURCE query LOOP
  IF ( a corresponding row exists in the DIM TABLE 
  THEN 
    IF data are different THEN
      1. UPDATE the "CURRENT" row of the DIM TABLE 
           SET VALID_TO = NOW
               CURRENT = 'N'
      2. INSERT new version into DIM TABLE 
    END IF
  ELSE
    INSERT new row into DIM TABLE 
  END IF

secara sederhana, cek dulu kondisi PK dan FK(integrity
data) yg koresponden lalu kemudian cek perbedaan
datanya kemudian insert data yg baru dengan memakai
info koresponden tersebut.
untuk pengecekan ini bisa memakai:
Select * from SOURCE MINUS select * from DIM 
(...simple way)

Pada type 2 ini history row sebelumnya dikeep(tanpa
menghapus data sebelumnya).

sekian dari saya, mohon rekan2 lain yg lebih expert 
sekiranya untuk ikut membantu karena saya juga pemula
di konsep datawarehouse dan juga baru belajar PL/SQL.

regads,

Tuan tanah


--- Rahandra Pramono <[EMAIL PROTECTED]> wrote:

>  Dear all,
> 
>  
> 
> Ada yang punya script PL/SQL untuk SCD (Slowly
> Changing Dimension) Type 2
> gak ?
> 
> Jika ada yang memiliki, sudilah kiranya untuk
> berbagi
> 
>  
> 
> Terima kasih
> 
>  
> 
> andra
> 
>   _____  
> 
> 
> 
> [Non-text portions of this message have been
> removed]
> 
> 
> 
> --
> -----------I.N.D.O - O.R.A.C.L.E---------------
> Keluar: [EMAIL PROTECTED]
> Website: http://indo-oracle.blogspot.com
> Mirror: http://indooracle.wordpress.com
> -----------------------------------------------
> 
> Bergabung dengan Indonesia Thin Client User Groups, 
> Terminal Server, Citrix, New Moon Caneveral, di:
> http://indo-thin.blogspot.com 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 



 
____________________________________________________________________________________
Want to start your own business? Learn how on Yahoo! Small Business 
(http://smallbusiness.yahoo.com) 




--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.blogspot.com
Mirror: http://indooracle.wordpress.com
-----------------------------------------------

Bergabung dengan Indonesia Thin Client User Groups, 
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.blogspot.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indo-oracle/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/indo-oracle/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Kirim email ke