Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am using this line of code show error to my clients...

SQL
SET @ErrorMessage = ''  ~ Customer Personal Primary ID is expiring in '' + LTRIM(STR(@DATEDifferenceID1)) + '' Days.Would you like to proceed and save the remittance?''


the result of this code is
Customer Personal Primary ID is expiring in X Days.Would you like to proceed and save the remittance?



My main problem is this,
i want to show this message to my client in two lines,such like this one

Customer Personal Primary ID is expiring in X Days.
Would you like to proceed and save the remittance?


how can i do this in sql...?
Posted

1 solution

Hi,


Use like,

Char(13) or Char(10) may work for you.

SET @ErrorMessage = ''  ~ Customer Personal Primary ID is expiring in '' + LTRIM(STR(@DATEDifferenceID1)) + '' Days. '' + Char(13) + '' Would you like to proceed and save the remittance?''


This may work for you.
 
Share this answer
 
Comments
prince_rumeel 17-Sep-12 4:09am    
<pre lang="SQL">SET @ErrorMessage = '' ~ Customer Personal Primary ID is expiring in '' + LTRIM(STR(@DATEDifferenceID1)) + '' Days. '' + Char(13) + '' Would you like to proceed and save the remittance?''</pre>

This Work For Me Too Nice.My Problem Has Been Solve Out.
Thanks Alot @amitgajjar
AmitGajjar 17-Sep-12 4:10am    
Your welcome.

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