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 |
snow12
Yak Posting Veteran
74 Posts |
Posted - 2012-06-27 : 18:03:57
|
Hello:I have some procedure return null string.For exampleEXEC sp_Name @name OUTEXEC sp_list @list OUT select @message = 'The following students name are: ' + @name + CHAR(13) + 'The following list are : ' + @list if EXEC sp_Name and sp_list both return the value, the message has content, but if EXEC sp_list @list OUT return null, the whole message is empty.EXEC sp_Name @name OUT still has value. How to show message which sp_Name has value but sp_list return nullThank you very much! |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2012-06-27 : 19:16:31
|
Use ISNULL:select @message = 'The following students name are: ' + ISNULL(@name,'') + CHAR(13) + 'The following list are : ' + ISNULL(@list,'')JimEveryday I learn something that somebody else already knew |
|
|
snow12
Yak Posting Veteran
74 Posts |
Posted - 2012-06-28 : 15:57:44
|
Thank you very much! You are big helper |
|
|
|
|
|