Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-Server-2008
Hi,
I am using this line of code show error to my clients...
 
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 16-Sep-12 22:39pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
prince_rumeel at 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 at 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)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 205
3 Jochen Arndt 180
4 Sergey Alexandrovich Kryukov 165
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,650
3 Kornfeld Eliyahu Peter 3,460
4 Sergey Alexandrovich Kryukov 2,811


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 17 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100