MySQL Forums
Forum List  »  Newbie

Re: Extract text of a TEXT-field to insert into another TEXT-field
Posted by: Jay Pipes
Date: July 30, 2005 04:23PM

UPDATE my_table
SET text_field2 = SUBSTRING_INDEX(text_field1, "\n", 1)
, text_field1 = SUBSTRING(text_field1, INSTR(text_field1, "\n"));

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.