On Mon, Jun 02, 2003 at 06:49:42AM -0700, Admin wrote: > Is there any way to do a hexadecimal search via MySQL? I've found that the > data I uploaded from text files has some end-of-line characters in it, and > its causing my data to break in mid-line when spitting out a text file. > Would be cool to search the table for offending characters if possible.
Yes, you specify hexadecimal strings that you can then use with the various string functions, including the string comparison functions: http://www.mysql.com/doc/en/Hexadecimal_values.html http://www.mysql.com/doc/en/String_functions.html http://www.mysql.com/doc/en/String_comparison_functions.html You could replace all CRLF sequences with spaces in a particular field with a query like: UPDATE mytable SET mytext=REPLACE(mytext, 0x0D0A, ' '); Hope that helps. Jim Winstead MySQL AB -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]