Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update script help

Status
Not open for further replies.

mkey

Programmer
Joined
Oct 3, 2001
Messages
288
Location
CA
Hi All,
My Script looks something like this.

SELECT a.id, a.name, a.type, b.alias, a.site_id
FROM site a INNER JOIN site_name_alias b ON a.id = b.site
WHERE ((a.id >1000000) And (a.id < 1999999) AND (a.name Is Null));

Now what I want to do is an update on the a.name to be the same as b.alias. Because right no the a.name is null value.
Thank you!
 
Hi,

Update site a
set a.name = b.alias
from site a INNER JOIN site_name_alias b ON a.id = b.site
WHERE ((a.id >1000000) And (a.id < 1999999) AND (a.name Is Null))


Kim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top