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)
 Update a field but only where the field is blank

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-08-11 : 08:39:15
Stuart writes "I have a table with two lists of information contained in fields CCE3 and CCE4.

CCE4 contains a value in each line but CCE3 doesnt in everyline.

I want to update CCE3 with the value in CCE4 BUT only when the value in CCE3 is null. This will end up with a value in CCE3 on everyline either unique or the same as CCE4.


Please help?"

druer
Constraint Violating Yak Guru

314 Posts

Posted - 2006-08-11 : 08:41:37
update table
set cce3 = cce4
WHERE cce3 IS NULL

Hope it helps,
Dalton

Blessings aren't so much a matter of "if they come" but "are you noticing them."
Go to Top of Page
   

- Advertisement -