In article <[EMAIL PROTECTED]>, symbulos <[EMAIL PROTECTED]> writes:
> On Monday 09 May 2005 15:17, Roger Baklund wrote: >> You could use the LEFT() function to return for instance the 200 first >> characters: >> >> SELECT LEFT(article,200) AS start_of_article >> FROM articletable WHERE ... >> >> You could also use the SUBSTRING_INDEX() function, if your lines are >> separated with \r\n: >> >> SELECT SUBSTRING_INDEX(article,'\r\n',2) AS two_first_lines >> FROM articletable WHERE ... >> >> <URL: http://dev.mysql.com/doc/mysql/en/string-functions.html > > The problem of solution (2) is that the lines are not separated by any > character, In this case you should first define what a "line" is for you. > whilst the problem of solution (1) is that it could potentially > break a word in the middle. In this case you could remove everything after the last whitespace in your application. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]