Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
New Line Character
New Line Character
Rate Topic
Display Mode
Topic Options
Author
Message
Minnu
Minnu
Posted Monday, September 17, 2012 5:02 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 3:12 AM
Points: 123,
Visits: 367
Hi,
Am using below query to display veh_name, expiration_date,
for new line character, here am using "+CHAR(10)"
what is the new line character, to display the below query.
CREATE VIEW [dbo].[Veh_Market]
AS
SELECT id,
CASE WHEN Veh_Name IS NULL or Veh_Name = '' THEN ''
ELSE CASE WHEN expiration_date IS null then
' Vehicle Name: ' + Veh_Name +CHAR(10)
ELSE ' Vehicle Name: ' +Veh_Name + ' (Expires ' + rtrim(convert(varchar, expiration_date,107)) + ')' +CHAR(10)
END
END
AS summary FROM veh
plz help................
Post #1360105
laurie-789651
laurie-789651
Posted Monday, September 17, 2012 5:34 AM
SSC Veteran
Group: General Forum Members
Last Login: Today @ 3:37 AM
Points: 275,
Visits: 790
What are you trying to do exactly?
Post #1360119
Lokesh Vij
Lokesh Vij
Posted Monday, September 17, 2012 6:05 AM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 8:24 AM
Points: 1,176,
Visits: 1,253
Skanda (9/17/2012)
what is the new line character, to display the below query.
Please be clear and specific. If you are new to this forum, its worth looking at best practices to post your queries (check my signature for the link)
~ Lokesh Vij
Guidelines for quicker answers on T-SQL question
Guidelines for answers on Performance questions
Link to my Blog Post -->
www.SQLPathy.com
Follow me
@Twitter
Post #1360135
2ndHelping
2ndHelping
Posted Thursday, September 20, 2012 11:55 AM
Grasshopper
Group: General Forum Members
Last Login: Friday, September 28, 2012 6:58 AM
Points: 11,
Visits: 51
actually, char(10) IS the newline character. Maybe you're looking for carriage return? If so, that's char(13)
Post #1362206
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.