Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COLUMN 1 | COLUMN 2 | COLUMN 3 | COLUMN 4
- Hallo out there Hallo out there
- My NULL name is My name is
- I'm a rabbit I'm a rabbit
- UPDATE dbo.table
- SET column4 = COALESCE(column1, '')
- + COALESCE(' ' + column2, '')
- + COALESCE(' ' + column3, '');
- select ISNULL([COLUMN 1],'')+' ' +
- isnull([COLUMN 2],'')+' ' +
- isnull([COLUMN 3],'')
- from your_table
- UPDATE table
- SET Column4 = CONCAT(Column1 + ' ', Column2 + ' ', Column3)
- UPDATE table
- SET Column4 =
- ISNULL(Column1+' ','') +
- ISNULL(Column2+' ','') +
- ISNULL(Column3,'')
- select isnull(convert(varchar(255),[COLUMN1]),'')+' '+isnull(convert(varchar(255),[COLUMN2]),'')+' '+isnull(convert(varchar(255),[COLUMN3]),'')
- from table
- UPDATE table
- SET COLUMN4 = isnull(convert(varchar(255),[COLUMN1]),'')+' '+isnull(convert(varchar(255),[COLUMN2]),'')+' '+isnull(convert(varchar(255),[COLUMN3]),'')
- update yourtable SET COlumn4= ltrim(rtrim(isnull([COLUMN 1],'') +' '+isnull([COLUMN 2],'') +' '+ isnull([COLUMN 3],'')))
Add Comment
Please, Sign In to add comment