Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 display output on separate separate line

Author  Topic 

dave23
Starting Member

3 Posts

Posted - 2007-02-10 : 01:31:17
How can i format my query so that each piece of data appears on a new separate line? Is there a command for a new line feed? \n does not work.

thanks.

For example:

a: data
b: data
c: data

a: data
b: data
c: data

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-02-10 : 02:01:49
Isn't this suppose to be a front end function ? I mean do this in your front end.

What do you want to achieve ?


KH

Go to Top of Page

dave23
Starting Member

3 Posts

Posted - 2007-02-10 : 12:10:26
It could very well be a front-end function. However, i want to display that pattern of output when i do my query in sql server.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-02-10 : 12:48:52
I do this in SQL (in Q.A.) where, for example, I want to compare the columns from tables in different databases:

SELECT TOP 100
'D', D.*,
CHAR(13)+CHAR(10)+'S ', S.*,
CHAR(13)+CHAR(10)+'----------'
FROM DestinationDB.dbo.MyTable AS D
JOIN SourceDB.dbo.MyTable AS S
ON D.MyPK = S.MyPK

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-02-10 : 13:48:26
but this will only work in display results in text mode.



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

dave23
Starting Member

3 Posts

Posted - 2007-02-10 : 16:15:36
That's what i wanted - to see the results in text mode. I'm performing a query.
Go to Top of Page

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2007-02-10 : 21:25:38
quote:
Originally posted by dave23

That's what i wanted - to see the results in text mode. I'm performing a query.


Well if it's what you wanted, I assume you're going to say thank you to Kristen


Ryan Randall
www.monsoonmalabar.com London-based IT consultancy

Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page
   

- Advertisement -