Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace Line Breaks In SQL Command

Status
Not open for further replies.

autumnEND

Programmer
Nov 1, 2005
61
GB
Hi, is there a command which lets you change the line break from vbcrlf to <br> in the sql command?

so once displayed on the web page in the grid view label.
it will display the line breaks automatically.

or is this something that i should only do on the html side of things and not in the sql command

SELECT [newsTITLE], [newsARTICLE] FROM [news]

it is the newsARTICLE field that im wanting to replace the line breaks in

the data is entered into SQL using a webform.

at the moment it will display the text with no spaceing at all.

any help would be greatly appreciated
 
Code:
SELECT [newsTitle], REPLACE(newsARTICLE,CHAR(13)+CHAR(10),'<br>') AS newsARTICLE FROM [News]



Borislav Borissov
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top