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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query

Author  Topic 

ralph.devlin
Starting Member

4 Posts

Posted - 2008-12-11 : 15:06:51
I am trying to devlop a query to update one table with date from another.

The main table is dbo.TIUSER the second table is dbo.WORKSTAT. Bother tables can be linked using the TIUSER column that is a number. I want the DEPARTMENT column for each record in dbo.WORKSTAT that matches the TIUSER column in dbo.TIUSER to be updated with what the TIUSER.DEPARTMENT contains. Thanks

Ralph

hey001us
Posting Yak Master

185 Posts

Posted - 2008-12-11 : 15:23:43
UPDATE w
SET w.DEPARTMENT = t.DEPARTMENT
FROM dbo.WORKSTAT w
INNER JOIN dbo.TIUSER t ON d.TIUSER = t.TIUSER


hey
Go to Top of Page
   

- Advertisement -