469,913 Members | 1,947 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,913 developers. It's quick & easy.

Removing Nulls

Hello Everyone, I have a View that is returning null values. This is not a problem except that I don't want the user to see "NULL" in the data. I want to replace "NULL" with a blank. The sql that I have is shown below:

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER VIEW dbo.CUSVW_SCHEMATIC_DETAILS_VENDOR
AS
SELECT [DIVISION], [DIVISION NAME], [STOCKING SECTION #], [STOCKING SECTION NAME],
[FIXTURE], [SIZE], [STORE #], [AISLE NUMBER], [AISLE SIDE],
[LEFT STOCKING SECTION #], [LEFT STOCKING SECTION NAME],
[LEFT STOCKING SECTION SIZE], [RIGHT STOCKING SECTION #],
[RIGHT STOCKING SECTION NAME], [RIGHT STOCKING SECTION SIZE]
FROM [AVTP].[dbo].[CUSVW_SCHEMATIC_DETAILS]
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

How can I get the nulls to be blanks instead of "NULL"??

Thanks!
Jul 31 '07 #1
2 1278
ck9663
2,878 Expert 2GB
Hello Everyone, I have a View that is returning null values. This is not a problem except that I don't want the user to see "NULL" in the data. I want to replace "NULL" with a blank. The sql that I have is shown below:

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER VIEW dbo.CUSVW_SCHEMATIC_DETAILS_VENDOR
AS
SELECT [DIVISION], [DIVISION NAME], [STOCKING SECTION #], [STOCKING SECTION NAME],
[FIXTURE], [SIZE], [STORE #], [AISLE NUMBER], [AISLE SIDE],
[LEFT STOCKING SECTION #], [LEFT STOCKING SECTION NAME],
[LEFT STOCKING SECTION SIZE], [RIGHT STOCKING SECTION #],
[RIGHT STOCKING SECTION NAME], [RIGHT STOCKING SECTION SIZE]
FROM [AVTP].[dbo].[CUSVW_SCHEMATIC_DETAILS]
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

How can I get the nulls to be blanks instead of "NULL"??

Thanks!
try:

SELECT isnull(DIVISION,' ') as division....and so on...
Jul 31 '07 #2
Try using case statements

case when division is null then '' esle division end

sort of thins, this need to be in the select statement
Aug 3 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Dan Perlman | last post: by
3 posts views Thread by aaj | last post: by
6 posts views Thread by mike | last post: by
3 posts views Thread by Simon | last post: by
1 post views Thread by =?Utf-8?B?ai5hLiBoYXJyaW1hbg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.