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 2005 Forums
 Transact-SQL (2005)
 New line character

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2008-06-18 : 16:54:14
I have text in a description field which has a new line character which is causing the value from the column being displayed in 2 lines

'Receipt#
3 generated for the amount of $ 130.00'

How can replace the new line character with blank space ''.

Any suggestions and inputs would help

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-18 : 16:56:48
SELECT REPLACE(@s, CHAR(10), ' ')

If CHAR(10) doesn't do it, try CHAR(13).

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 -