Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 4th, 2004, 08:16 AM
Registered User
 
Join Date: Oct 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Changing every character in a table

I want to go through a whole table (or tables actually) and replace every
instance of '\n\n' to '\n'

Basically a person entering data has, in some (but not all cases) added
several line breaks rather than a single line break - so text is sometimes
spaced out across the page.

I haven't decided to replace all '\n\n' with '\n' or all '\n\n\n' with
'\n\n' ... but in either case this needs to be done.

Can you think of a MySQL query (or use PHP if needed) that will do this?

All help appreciated

Cheers


Reply With Quote
  #2 (permalink)  
Old November 4th, 2004, 05:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Look for REPLACE() function on mysql documentation. That should help you out of this.

Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically changing table location csloanATYC BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 November 6th, 2008 02:32 PM
dynamically changing the destination table premaanand SQL Server DTS 1 April 10th, 2006 03:37 PM
Dynamically Changing the content of a table cell asdasd Javascript 4 February 18th, 2005 01:44 PM
Changing a Table Name Zejtuni Crystal Reports 2 July 24th, 2004 04:41 AM
Changing Table structure on the fly Tallon Wolle Pro VB 6 1 January 21st, 2004 10:36 AM



All times are GMT -4. The time now is 01:35 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.