Gossamer Forum
Home : General : Databases and SQL :

Substite String Value in Column

Quote Reply
Substite String Value in Column
I'm using LinksSQL and I'm trying to find an SQL command to use in the SQL monitor that would allow me to remove a phrase in all rows for a specific column.

Basically, I have a field in the category database called 'Intro' and I need to remove all instances of the phrase 'Please see below'. Does anyone know of an SQL command that could replace 'Please see below' with '' (empty string)?

Thanks in advance for any help!

--FrankM
Quote Reply
Re: [FrankM] Substite String Value in Column In reply to
Code:
UPDATE lsql_Links SET FieldName = REPLACE(FieldName,'find','change to this')

That should work :)

Be sure to make a backup of your database though, as this has the potential to mess up your database if done wrong Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Substite String Value in Column In reply to
Thanks very much Andy, I appreciate your help. That did the trick and saved me some hours of manually replacing text...

--FrankM