November 30, 2004

A nice recursive query

update keywords set
word3 = IF ( locate( ' ', rest) , left( rest, locate( ' ', rest)-1 ) , rest),
rest = IF ( locate( ' ', rest) , substring( rest from locate( ' ', rest)+1 ) , '' )

Posted by torque at November 30, 2004 10:12 PM | TrackBack
Comments
Post a comment









Remember personal info?