SQLTeam.com | Weblogs | Forums

Updating column with information from another table

Hi, i have two tables. Table 1: an event list with select customer. Table 2: a master customer list. Both tables have a "customer_no" column. I need to update Table 1 with the customer numbers from Table 2. I only want to update rows in Table 1 that have a matching row in Table 2. --(Table 2 is the master customer list and is a lot bigger than Table 1.)

SET ? = t2.?
FROM dbo.table1 t1
INNER JOIN dbo.table2 t2 ON t2.customer_no = t1.customer_no