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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Sql statement

Author  Topic 

vernonmechery
Starting Member

1 Post

Posted - 2011-09-08 : 05:08:48
Hi Folks,

I have a table "temp". I want to write a query which will update the email address in "temp" to the "alt" table.


There is a table "comm" which hold the id's and customerid's which acts as a mapping table for temp and alt.

Let me know if I need to explain further..

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-09-08 : 08:10:12
[code]UPDATE a
SET info_email = e.email_address
FROM email_temp_table e
JOIN sp_comm_party s
On s.account_id = e.account_id
JOIN alt_comm_point a
On a.cust_id = s.cust_id[/code]

By the way, I won't prefix my table names with sp_ as that is what system stored procedures are prefixed with.
Go to Top of Page
   

- Advertisement -