Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi friends,
I want to ask about SQL.

SQL
IF(@DATEDifferenceID1 <= 90 AND NOT @DATEDifferenceID1 < 0 )
BEGIN
	
	SET @ErrorMessage = ''  ~ Customer Personal Primary ID is expiring in '' + LTRIM(STR(@DATEDifferenceID1)) + '' Day(s). '' + Char(10) + '' Would you like to proceed and save the remittance?''
	SET @ErrorCode = 1001
END


i am using this line of code.and it display my error message like this

line1..............
line2..............

but i want to display my error message like this

line1..............

line2..............

mean to say i want to add an extra breal line..
helpout me please how can i do this in SQL 2008???
Posted

1 solution

I think CHAR(13) is the line break.
So for example

SQL
SET @ErrorMessage = 'Line 1' + CHAR(13) + 'Line 2' 
 
Share this answer
 
v2
Comments
prince_rumeel 19-Sep-12 3:52am    
thanks for your reply.

But bro char(10) is for break line.
as per mentioned in my question there is some line of code,there i am using this char(10) there is line break present.
but i need to show two line break in my sentences...

plz help me
Legor 19-Sep-12 3:56am    
Yes it is platform dependent as Sergey mentioned below. Can't you just add another CHAR(10) for another line break then?
Sergey Alexandrovich Kryukov 19-Sep-12 3:54am    
What is a line break, is unfortunately platform-dependent. In Microsoft systems, for example, this is LF CR (13, 10).
--SA
prince_rumeel 19-Sep-12 4:05am    
i am using windows 7.and i want to place two line break in my sentences
Legor 19-Sep-12 4:09am    
Well not much more i could add ... SET @ErrorMessage = 'Line 1' + CHAR(13)+ CHAR(13)+ 'Line 2'

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900