sql server update field that contains nulls

harrisw48

New member
Local time
Today, 13:41
Joined
Jan 5, 2005
Messages
9
Im trying to update a field that contains NULLS using the concatenate code below

dbo.[Current Extract].[field1] = isnull(dbo.[Current Extract].[field1], '') + dbo.[Current Extract].[field1] + '-1-'

The code appears to work but it doesnt update the field, it still contains NULLS where you would expect data.

Any ideas?
 
update table
set dbo.[Current Extract].[field1] = '''' + dbo.[Current Extract].[field1] + '-1-'
where dbo.[Current Extract].[field1] ISNULL
 

Users who are viewing this thread

Back
Top Bottom