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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Results Wrapping

Author  Topic 

rintus
Starting Member

26 Posts

Posted - 2008-10-02 : 18:45:11
Hey Guys:

I am trying to run this SQL on a script. But the fields were too long and I was though of selecting the first 50 characters from the field. But the output is still wrapping. Can you please suggest me any function that won't allow it to wrap.

Example -

Select name,
roll_no,
left(summary, 50) Summary
from student

When I am running this SQL on a script on a unix server it still wraps in the result.

Please suggest.

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-10-02 : 18:53:23
There's probably carriage returns and/or line feeds in the data.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

rintus
Starting Member

26 Posts

Posted - 2008-10-02 : 19:14:21
Is there a way to remove it.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-10-02 : 19:15:31
You can try REPLACE(REPLACE(Column1, CHAR(13), ' '), CHAR(10), ' ')

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -