title: Line break in T-sql (Char(13)) is not working
body: <p>I am using a T-sql (Sql server 2008) stored procedure which returns a custmized values based on many business conditions. (This must be done on database because i have a generic call to many stored procedures from <code>C#</code> code).
  My issue here is with the line-break. I use in my code <code>Char(13);Char(13) + char(10); char(10)...</code> but it doesn't work.</p>
  
  <p>NB: If i test an <strong>INSERT</strong> statment it works but in the <strong>SELECT</strong> statment no <strong>line break</strong> ,it generates a <strong>White space</strong> (Done on a simple query).
  Bellow my code </p>
  
  <pre><code>ALTER PROCEDURE [dbo].[getDebtorAddress] (
      @idFolder int 
  
  )   
  AS
  BEGIN
  DECLARE
      @type bit  ,
      @firstName varchar(100) ,
      @familyName varchar(100) ,
      @raisonSocial varchar(100),
      @jeuneFille varchar(100) ,
      @saleName varchar (100) ,
      @enseigne varchar (100) ,
      @sigle varchar (100) ,
      @address varchar (max),
      @lieuDit varchar(100) ,
      @postalCode varchar (100),
      @city varchar (100),
      @country varchar (100),
      @finalAddress nvarchar(max)
  
  
      SET NOCOUNT ON;
      SELECT DISTINCT 
      @firstName = Actor.M_EN_NOM,
      @familyName = Actor.M_EN_PRENOM1,
      @raisonSocial = Actor.M_EN_RAISONSOCIALE,
      @jeuneFille = Actor.M_EN_NOMJEUNEFILLE,
      @saleName = Actor.M_EN_NOMCOMMERCIAL,
      @enseigne = Actor.M_EN_ENSEIGNE,
      @sigle = Actor.M_EN_SIGLE,
      @address = ActorCP.M_PR_CP_ADRESSE,
      @lieuDit = ActorCP.M_PR_CP_LIEUDIT,
      @postalCode = PostalCode.C_PA_CP_CODEPOSTALE,
      @city = PostalCode.C_PA_CP_VILLE,
      @country = Country.C_PA_PA_LIBELLE,
      @type = Actor.M_EN_TYPE
  
  
      FROM M_EN Actor
      LEFT OUTER JOIN M_DE Debtor ON Actor.M_EN_ID =Debtor.M_EN_ID  
      LEFT OUTER JOIN M_DO Folder  ON Debtor.M_DE_ID= Folder.M_DE_ID
      LEFT OUTER JOIN M_PR_CP ActorCP ON Actor.M_EN_ID = ActorCP.M_EN_ID
      LEFT OUTER JOIN C_PA_CP PostalCode ON ActorCP.C_PA_CP_ID = PostalCode.C_PA_CP_ID
      LEFT OUTER JOIN C_PA_PA Country ON ActorCP.C_PA_PA_ID = Country.C_PA_PA_ID
      WHERE Folder.M_DO_ID = @idFolder
  
      if(@type=0)
           begin
              if (@firstName is not Null and @firstName !='')
                  set @finalAddress= @firstName
              if(@familyName is not Null and @familyName != '')
                  set @finalAddress = @finalAddress + ' ' + @familyName +CHAR(13)
              if(@jeuneFille is not null and @jeuneFille !='' )
                  set @finalAddress=@finalAddress + ' ' + @jeuneFille + CHAR(13)
              if(@address is not null and @address != '')
                  set @finalAddress=@finalAddress +  REPLACE(@address,'|',char(13)) 
              if(@lieuDit is not null and @lieuDit != '')
                  set @finalAddress = @finalAddress  + @lieuDit + CHAR(13)
              if(@postalCode is not null and @postalCode != '')
                  set @finalAddress = @finalAddress  + @postalCode + CHAR(13)
              if(@country is not null and @country != '')
                  set @finalAddress = @finalAddress  + @country + CHAR(13)
           end
      else
          begin
              if (@raisonSocial is  Null or @raisonSocial = '')
                  Begin
                      if(@firstName is not null and @firstName != '')
                          set @finalAddress = @finalAddress  + @firstName + CHAR(13)
                      if(@familyName is not null and @familyName != '')
                          set @finalAddress = @finalAddress  + @familyName + CHAR(13)
                  end
              else
                  set @finalAddress  =  @finalAddress + @raisonSocial + CHAR(13)
               if(@jeuneFille is not null and @jeuneFille !='' )
                  set @finalAddress=CHAR(13) + @finalAddress + ' ' + @jeuneFille + CHAR(13)
              if(@saleName is not null and @saleName != '')
                  set @finalAddress=@finalAddress +  @saleName + CHAR(13)
              if(@enseigne is not null and @enseigne != '')
                  set @finalAddress=@finalAddress +  @enseigne + CHAR(13)
              if(@sigle is not null and @sigle != '')
                  set @finalAddress=@finalAddress +  @sigle + CHAR(13)
              if(@address is not null and @address != '')
                  set @finalAddress=@finalAddress +  REPLACE(@address,'|',char(13))   
           end
  
           Create Table #TempAddress 
           (
            TempAddress_ID  int ,
            adresse nvarchar(max)
           )
           INSERT INTO #TempAddress (#TempAddress.adresse) VALUES(@finalAddress)
           SELECT #TempAddress.adresse from #TempAddress
           DROP TABLE #TempAddress
  END
  </code></pre>
  
  <p>the current result is</p>
  
  <pre><code>aaaaa bbbbb ccccc dddddd
  </code></pre>
  
  <p>but my expected result is </p>
  
  <pre><code>aaaaa 
  bbbbb
  ccccc
  ddddd
  </code></pre>
  
  <p>Any suggestion or help ? 
  Thanks</p>