isnull函数问题
DECLARE   @test   varchar(100) 
 SET   @test= 'x          ' 
 SELECT   isnull(RIGHT(@test,2), 'xx ') 
 为何结果不显示‘xx’
------解决方案--------------------SqlServer里的NULL不是字符串为空格的意思.
------解决方案--------------------DECLARE @test varchar(100) 
 SET @test= 'x    ' 
 if charindex( '  ',@test)> 0 
 set @test= 'xx ' 
 select @test 
------解决方案--------------------select right(@test,2) 
 因为这个两个空格呀,GG