Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | AskSQLTeamAsk SQLTeam Question
 
 
                                        0 Posts | 
                                            
                                            |  Posted - 2004-11-19 : 12:20:55 
 |  
                                            | Chris writes "I am working with a simple data warehouse star schema.  I need to populate the dimension tables and the fact table with a stored procedure.  The dimension tables are based off of other tables on the server.  My tables include: Star_Customer, Star_Product, Star_Vender, Star_Time as the dimension tables.  The fact table is Sales. All primary keys have been set and identities complete.  So, my question is, how do I populate those given tables within a stored procedure.  Then, if someone updates any dimension tables, the fact table deletes itself and repopulates.    Any help would be appreciated Chris" |  |  
                                    | kmarshbaStarting Member
 
 
                                    24 Posts | 
                                        
                                          |  Posted - 2004-11-22 : 14:40:01 
 |  
                                          | Hmm, well this question is not very clear so before answering I'll need to ask some questions:1. Will you be using the sproc to insert values from another table or will you be passing the values to the sproc whereby inserting 1 record per execution e.g. via a web page?2. If you want the fact table to repopulate you will need to set a trigger on each dimension table for update, insert, delete that will call a sproc you will have to build to repopulate the fact table.The answers to my questions should get us started towards an answer to your question.Thanks,Kevin |  
                                          |  |  |  
                                |  |  |  |