Inserting Line break in Store Procedure

  • Hello Friends !!!

    I have created a Store Procedure which is as below

    *-----------------------------------------------------------*

    CREATE PROCEDURE [dbo].[MilestoneAlertMail] AS

    declare @Miledate as datetime

    declare @Projectid as int

    declare @Projectdetid as int

    declare @Body as varchar(8000)

    declare @mailsenton as datetime

    set @Body= 'Alert Mail – I (MIS) Progress Report to the Client First Reminder \n'

    set @Body =@Body +"\n"+ 'ddfd'

    *-----------------------------------------------------------*

    In above i get the Result is something like:

    *-----------------------------------------------------------*

    Alert Mail – I (MIS) Progress Report to the Client First Reminder \n\nddfd

    *-----------------------------------------------------------*

    I try to use \n as a line break but those get printed in the mail itself rather then breaking the line in two.

    Can you Help me out.

    Thanking you

    Regards

    Neetal Shah

  • Try

    set @Body = 'Alert Mail – I (MIS) Progress Report to the Client First Reminder ' + CHAR(13) + CHAR(10)

    set @Body = @Body + CHAR(13) + CHAR(10) + 'ddfd'

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Thanks Buddy..

    I got the solution for the same...

    Thanks alot

    Regards

    Neetal Shah

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply