Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 4th, 2004, 08:16 AM
Registered User
 
Join Date: Oct 2004
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


 
Old November 4th, 2004, 05:54 PM
Friend of Wrox
 
Join Date: Jun 2003
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





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





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