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-09-24 : 08:42:41 
 |  
                                            | writes "Hi,I am building datamart but I need your expert advise to update the datamart.I get text file & load it into Staging Table.  From Staging Table I load it into Dimension tableCust_Staging_TableCust_id   Cust_Name  Cust_Add    Cust_City111       Sam        100 St.     San Jose222       Maria      7th Ave     Hollywood333       kathy      5th St.     Dallas444       Nicole     1st Ave     ArlingtonCust_Dimension_TableCust_wk   Cust_id   Cust_Name  Cust_Add    Cust_City1          111       Sam        100 St.     San Jose2          222       Maria      7th Ave     Hollywood3          333       kathy      5th St.     Dallas4          444       Nicole     1st Ave     ArlingtonNow I get a new text file for customer table with info. changed.  For example Maria's address has changed. I truncate the previous info in Cust_Staging_Table & load this new info from text file.Cust_Staging_TableCust_id   Cust_Name  Cust_Add    Cust_City111       Sam        100 St.     San Jose222       Maria      44th Ave    Burbank333       kathy      5th St.     Dallas444       Nicole     1st Ave     ArlingtonTo make this info. in sync with my Cust_Dimension_Table, I use the following update statementUpdate Cust_Dimension_Tableset Cust_Dimension_Table.Cust_Name = Cust_Staging_Table.Cust_Name Cust_Dimension_Table.Cust_Add = Cust_Staging_Table.Cust_Add Cust_Dimension_Table.Cust_City = Cust_Staging_Table.Cust_City where  Cust_Dimension_Table.Cust_id = Cust_Staging_Table.Cust_id In my datamart I have more than 200000 records.  Any info. can change regarding a particular column.  Is there an effecient way of updating the dimension table.  (Shall I use views/temp tables).  Can anyone please show me the effecient solution for update with above example.ThanksSteve" |  |  
                                |  |  |  |