Gossamer Forum
Home : Products : Gossamer Links : Discussions :

MySQL Statements

Quote Reply
MySQL Statements
I am going through trying to clean up some of my data... and I know some bad stuff is in there needed to be cleaned. Notquite sure how I can search for in in MySQL.

I want to search for tabs and returns... sort of a "Select * from Links where Description LIKE '%RETURN%'." is this possible? What do I use to return a tab or return character?

Also, is there any way to use the perl "^" and "$" commands in a search- that is, the leftmost character is a XXX or the rightmost character is a XXX? I want to find fields that begin or end with an extra space....

Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] MySQL Statements In reply to
See:

http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html

or for more powerful pattern matching:

http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html

You can probably use "\t" for tab and "\n" or "\r\n" for newlines.

Adrian
Quote Reply
Re: [brewt] MySQL Statements In reply to
Thanks Adrian!
dave

Big Cartoon DataBase
Big Comic Book DataBase