Click here to Skip to main content
Sign Up to vote bad
good
See more: SQL2008
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 - 21:39


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.
  Permalink  
Comments
prince_rumeel - 17 Sep '12 - 4:09
<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:10
Your welcome.

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 273
1 Sergey Alexandrovich Kryukov 179
2 Maciej Los 136
3 Richard MacCutchan 125
4 Tadit Dash 100
0 Sergey Alexandrovich Kryukov 10,264
1 OriginalGriff 7,917
2 CPallini 4,181
3 Rohan Leuva 3,522
4 Maciej Los 3,125


Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 17 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid