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.
| Author |
Topic |
|
cnaypi
Starting Member
22 Posts |
Posted - 2008-08-21 : 19:29:34
|
| I'm particularly interested with the ISNULL. Is this indicating to ignore any null values?Update caSET RevItemName = RTRIM(RevItemName) + ' ' + ISNULL(LTRIM(RTRIM(rc.CodeAbbreviation)),'')FROM dbo.RevisionCode rc INNER JOIN dbo.CA_ItemNameWorking ca ON ca.RevisionCodeId = rc.CodeIdUpdate caSET FullItemName = RTRIM(FullItemName) + ' ' + ISNULL(LTRIM(RTRIM(REPLACE(VAC.[Full],' ',''))),'')FROM dbo.CA_VLAttributeCodes VAC (NOLOCK) INNER JOIN dbo.CA_ItemNameWorking ca ON VAC.CodeId = ca.RevisionCodeId AND VAC.CodeCategoryId = 52Update caSET IdealItemName = RTRIM(IdealItemName) + ' ' + ISNULL(LTRIM(RTRIM(REPLACE(VAC.[Ideal],' ',''))),'')FROM dbo.CA_VLAttributeCodes VAC (NOLOCK) INNER JOIN dbo.CA_ItemNameWorking ca ON VAC.CodeId = ca.RevisionCodeId AND VAC.CodeCategoryId = 52 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-08-21 : 19:31:51
|
| Replacing Null value with Blank. |
 |
|
|
cnaypi
Starting Member
22 Posts |
Posted - 2008-08-21 : 19:35:54
|
| Thanks! one more question is this for Transact sql 2005? I am asking because I ran this statement using sql 2005 and the Null values are not being replaced with '' values NULLS are still showing up in my results |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-08-21 : 19:37:06
|
| Perhaps the data has the word NULL in it and not an actual NULL value.Word NULL:SELECT * FROM YourTable WHERE YourColumn LIKE '%NULL%'NULL data:SELECT * FROM YourTable WHERE YourColumn IS NULLTara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
cnaypi
Starting Member
22 Posts |
Posted - 2008-08-21 : 19:49:58
|
| Ah now I understand. Thanks! |
 |
|
|
|
|
|