flag of the United Kingdom
URBAN
Mainframe

User Comments

(for: MySQL: Search & Replace)
1 | Posted by: Gabriel Mihalache (Registered User) | ~ 1 year, 11 months ago |

Nice! Unfortunatelly, it’s non-standard. Can anyone point out an alternative which would work on IBM DB2, Oracle, or MS SQL Server? I imagine these have dedicated stored procedures that pretty much apply regexps to exact field.

2 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

Here’s how to do search-and-replace in:

MS-SQL & Sybase, it might be possible to tailor this for other databases.

3 | Posted by: Joen (Guest) | ~ 1 year, 11 months ago |

Very cool! I’m just learning a little bit of SQL now and then, and I love how it’s such a simple syntax. I’m sure you all read the t-shirt “select * from USERS where CLUE > 0” — the cool thing is, in the right DB that would actually do something!

In other comments, I love your slight website revamp! It’s so rare to see a good use of purple, and I love the green link color. And sIFR also? Very cool — is that font VTCorona?

4 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

I’m just learning a little bit of SQL now and then, and I love how it’s such a simple syntax.

It is simple and there are some great shortcuts too (although some of them might be database specific). For example, I use MySQL’s date parsing, time-spanning and mathematical functions a heck of a lot, simply because it’s easier (and quicker) to do them at the database rather than in my application.

I love that fact that I can store numerical timestamps in the database yet extract them as english date strings (eg: from “20050124093754” MySQL can yield “Tuesday, 24th January, 2005 @ 09:37” - that’s cool!)

“select * from USERS where CLUE > 0”

I actually used to have that shirt (bought from thinkgeek.com).

I also like the tagline on Jeremy Zawodny’s Weblog: “SELECT * FROM random_thoughts ORDER BY date DESC”.

I love your slight website revamp!

Hey thanks Joen. I’ve encountered mixed opinions on this revision. I’ll admit I was very unsure about the green/purple combo at first, but I’m really lovin’ it now.

And sIFR also? Very cool - is that font VTCorona?

No. It’s “Apoplex”, which I found on the “Old Typewriter Fonts” website. I new I wanted a “typewriter” font but it took a while to find one I was happy with. I think Apoplex is gorgeous.

5 | Posted by: zzapper (Guest) | ~ 1 year, 10 months ago |

If anyone comes across a search & replace with regexp for mysql please email me. In fact my requirement is to filter out non-ascii characters from mysql database fields

zzapper

NOTE: This comment has been edited by its author! Additions are shown in italics, deletions with a strike-through.

6 | Posted by: dlee (Guest) | ~ 11 months ago |

Thanks for this info - simple to use and it works well for mass field data updates in MySQL.

7 | Posted by: Trevor (Guest) | ~ 9 months ago |

Hey, I searched for how to search and replace in MySQL, and this came up. The perfect solution for updating a slew of outdated links in old Wordpress posts.

Thanks!

8 | Posted by: Iain Cuthbertson (Guest) | ~ 3 months ago |

This is the perfect quick fix I needed during a site move from XML to MySQL. Cheers!

Your Comments
  • Formatting your comments
  • A valid email address is only required if you wish to receive notifications of new comments posted in relation to this page


remember my details:
notify me of new comments:


W3C VALIDATE XHTML
W3C VALIDATE CSS