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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with update question 1

Status
Not open for further replies.

MatsHulten

Programmer
Dec 29, 2000
180
SE
Hi!

A time ago I took a backup of a table in the form of a simple copy of the table to ensure that the changes I was about to do wouldn't affect the original data.

Now I need to update the new table with data from the original table, where the fields in the new table exsists and are empty. (Contains only spaces or NULL.)

Could anyone give me some hints as how to do this?

-Mats
 
update originaltable
set originaltable.col1 = newtable.col1
from newtable
where originaltable.id=newtable.id
and originaltable.col1 is null
Cal

Remeber: What the large print givith, the small print taketh away...


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top