September 8, 2007 at 12:48 pm
I concantenate several columns and would like to do a line feed
only if the column value is not null. This does not work within the concantenation. Is there any way to do this?
IsNull(@RbrComm,'') +
IF @RBrComm Is Not Null
CHAR(13) + CHAR(10) +
Thanks so much,
Sam
September 8, 2007 at 6:58 pm
NULL concatenated with anything is still NULL if the default setting of "Concatenate Null Yields Null" was left on... so this simple ditty will do the job you asked...
IsNull(@RbrComm+CHAR(13)+CHAR(10),'')
--Jeff Moden
Change is inevitable... Change for the better is not.
September 9, 2007 at 3:38 pm
You've helped me several times, Jeff. Thanks!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply