sql - using parameters with max len and check for null vall -
i'm trying count column see max characters. i'm getting warning, know doesn't effect, it's more of annoyance , eliminate warning.
example follows:
declare @countthis varchar (255) select @counthis = max(len(col1)) #temp print '------- largest count column-----' + @countthis
the warning receive is:
warning: null value eliminated aggregate or other set operation.
i tried using case
statement couldn't figure out. if value null
ignore value.
is possible?
you can use
declare @countthis varchar (255) select @counthis = max(len(isnull(col1,''))) #temp
Comments
Post a Comment