none
Add blank line in HTML

    שאלה

  • SET @tableHTML =
        N'<br>This is an automated email generated by my.' + @crlf + @crlf +  
          N'<br>Please see below the current staff' + @crlf + @crlf + 
          N'<br>For any queries contact Joan' + @crlf + @crlf + 
        N'</table>' ;

    how do i add a blank line between each sentence?

    יום חמישי 16 פברואר 2012 14:39

תשובות

  • Try this.

    DECLARE @TABLEHTML NVARCHAR(MAX)
    SET @tableHTML =
        N'This is an automated email generated by my.<br />' +
          N'Please see below the current staff <br />' +
          N'For any queries contact Joan <br />' +
        N'</table>' ;    
      
        
      PRINT @TABLEHTML

    Use the HTML body format along with.

    I just added a <br /> . This is the tag in HTML which adds a line break in the text.


    Planet Earth is at risk. Global warming is on a high tide.
    Take Responsibility. Plant Trees. Keep your City Clean and Green.

    Mark all Helping Posts and Close your Threads. Keep the Forum Green.
     - Arun Kumar Allu

    • סומן כתשובה על-ידי Sam233 יום חמישי 16 פברואר 2012 15:59
    יום חמישי 16 פברואר 2012 15:37

כל התגובות

  • hI,

    Try this...

    DECLARE @TABLEHTML NVARCHAR(MAX)
    SET @tableHTML =
        N'This is an automated email generated by my.' + CHAR(13)+CHAR(10) +
          N'Please see below the current staff' +  CHAR(13)+CHAR(10) +
          N'For any queries contact Joan' + CHAR(13)+CHAR(10) +
        N'</table>' ;
        
      
        
      PRINT @TABLEHTML


    Peter Carter http://sqlserverdownanddirty.blogspot.com/

    • סומן כתשובה על-ידי Sam233 יום חמישי 16 פברואר 2012 15:12
    • סימון כתשובה בוטל על-ידי Sam233 יום חמישי 16 פברואר 2012 15:27
    יום חמישי 16 פברואר 2012 15:02
  • Thought I got it working till I changed the @body_format to HTML (from TEXT), to include the table...

    Everything worked, most importantly the table, but now the 3 sentences are all shown on the same line, how can I split them up on different lines.

    Using +CHAR(13)+CHAR(10)+ only works when the @body_format is set to TEXT.

    יום חמישי 16 פברואר 2012 15:31
  • יום חמישי 16 פברואר 2012 15:34
  • Try this.

    DECLARE @TABLEHTML NVARCHAR(MAX)
    SET @tableHTML =
        N'This is an automated email generated by my.<br />' +
          N'Please see below the current staff <br />' +
          N'For any queries contact Joan <br />' +
        N'</table>' ;    
      
        
      PRINT @TABLEHTML

    Use the HTML body format along with.

    I just added a <br /> . This is the tag in HTML which adds a line break in the text.


    Planet Earth is at risk. Global warming is on a high tide.
    Take Responsibility. Plant Trees. Keep your City Clean and Green.

    Mark all Helping Posts and Close your Threads. Keep the Forum Green.
     - Arun Kumar Allu

    • סומן כתשובה על-ידי Sam233 יום חמישי 16 פברואר 2012 15:59
    יום חמישי 16 פברואר 2012 15:37