SQLTeam.com | Weblogs | Forums

Not sure how to describe this data copying issue


I have a column in a destination table called district_code and one called actual_district. However my staging table created from a flat file import only has district_code. Is there any way to use the actual_district values already in the table for the other rows to populate the new entries without having to hard code in the 1,500 unique combinations of town to district?



Could you please provide more detail and examples:

  1. CREATE TABLE statements for the tables involved
    2, sample input data for both tables
  2. desired final data using the sample data


Thanks for the response. While trying to answer your question I realized the data is dirty. I need to look it over and see if I can clean it up before I proceed.

Thanks anyway.